本文整理匯總了Python中object_detection.utils.variables_helper.filter_variables方法的典型用法代碼示例。如果您正苦於以下問題:Python variables_helper.filter_variables方法的具體用法?Python variables_helper.filter_variables怎麽用?Python variables_helper.filter_variables使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類object_detection.utils.variables_helper
的用法示例。
在下文中一共展示了variables_helper.filter_variables方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_return_all_variables_when_empty_regex
# 需要導入模塊: from object_detection.utils import variables_helper [as 別名]
# 或者: from object_detection.utils.variables_helper import filter_variables [as 別名]
def test_return_all_variables_when_empty_regex(self):
variables = self._create_variables()
out_variables = variables_helper.filter_variables(variables, [''])
self.assertItemsEqual(out_variables, variables)
示例2: test_return_variables_which_do_not_match_single_regex
# 需要導入模塊: from object_detection.utils import variables_helper [as 別名]
# 或者: from object_detection.utils.variables_helper import filter_variables [as 別名]
def test_return_variables_which_do_not_match_single_regex(self):
variables = self._create_variables()
out_variables = variables_helper.filter_variables(variables,
['FeatureExtractor/.*'])
self.assertItemsEqual(out_variables, variables[2:])
示例3: test_return_variables_which_do_not_match_any_regex_in_list
# 需要導入模塊: from object_detection.utils import variables_helper [as 別名]
# 或者: from object_detection.utils.variables_helper import filter_variables [as 別名]
def test_return_variables_which_do_not_match_any_regex_in_list(self):
variables = self._create_variables()
out_variables = variables_helper.filter_variables(variables, [
'FeatureExtractor.*biases', 'StackProposalGenerator.*biases'
])
self.assertItemsEqual(out_variables, [variables[0], variables[2]])
示例4: test_return_variables_matching_empty_regex_list
# 需要導入模塊: from object_detection.utils import variables_helper [as 別名]
# 或者: from object_detection.utils.variables_helper import filter_variables [as 別名]
def test_return_variables_matching_empty_regex_list(self):
variables = self._create_variables()
out_variables = variables_helper.filter_variables(
variables, [''], invert=True)
self.assertItemsEqual(out_variables, [])
示例5: test_return_variables_matching_some_regex_in_list
# 需要導入模塊: from object_detection.utils import variables_helper [as 別名]
# 或者: from object_detection.utils.variables_helper import filter_variables [as 別名]
def test_return_variables_matching_some_regex_in_list(self):
variables = self._create_variables()
out_variables = variables_helper.filter_variables(
variables,
['FeatureExtractor.*biases', 'StackProposalGenerator.*biases'],
invert=True)
self.assertItemsEqual(out_variables, [variables[1], variables[3]])