本文整理汇总了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]])