当前位置: 首页>>代码示例>>Python>>正文


Python utils.load_config_from_file方法代码示例

本文整理汇总了Python中utils.load_config_from_file方法的典型用法代码示例。如果您正苦于以下问题:Python utils.load_config_from_file方法的具体用法?Python utils.load_config_from_file怎么用?Python utils.load_config_from_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utils的用法示例。


在下文中一共展示了utils.load_config_from_file方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_configs_load

# 需要导入模块: import utils [as 别名]
# 或者: from utils import load_config_from_file [as 别名]
def test_configs_load(self):
        ''' Make sure configs are loadable '''

        cfg_root_path = utils.get_config_root_path()
        files = glob.glob(
            os.path.join(cfg_root_path, "./**/*.yaml"), recursive=True)
        self.assertGreater(len(files), 0)

        for fn in files:
            print('Loading {}...'.format(fn))
            utils.load_config_from_file(fn) 
开发者ID:Res2Net,项目名称:Res2Net-maskrcnn,代码行数:13,代码来源:test_configs.py

示例2: _test_build_detectors

# 需要导入模块: import utils [as 别名]
# 或者: from utils import load_config_from_file [as 别名]
def _test_build_detectors(self, device):
    ''' Make sure models build '''

    cfg_files = get_config_files(None, EXCLUDED_FOLDERS)
    self.assertGreater(len(cfg_files), 0)

    for cfg_file in cfg_files:
        with self.subTest(cfg_file=cfg_file):
            print('Testing {}...'.format(cfg_file))
            cfg = utils.load_config_from_file(cfg_file)
            create_model(cfg, device) 
开发者ID:megvii-model,项目名称:DetNAS,代码行数:13,代码来源:test_detectors.py

示例3: _test_run_selected_detectors

# 需要导入模块: import utils [as 别名]
# 或者: from utils import load_config_from_file [as 别名]
def _test_run_selected_detectors(self, cfg_files, device):
    ''' Make sure models build and run '''
    self.assertGreater(len(cfg_files), 0)

    for cfg_file in cfg_files:
        with self.subTest(cfg_file=cfg_file):
            print('Testing {}...'.format(cfg_file))
            cfg = utils.load_config_from_file(cfg_file)
            cfg.MODEL.RPN.POST_NMS_TOP_N_TEST = 10
            cfg.MODEL.RPN.FPN_POST_NMS_TOP_N_TEST = 10
            model = create_model(cfg, device)
            inputs = create_random_input(cfg, device)
            model.eval()
            output = model(inputs)
            self.assertEqual(len(output), len(inputs.image_sizes)) 
开发者ID:megvii-model,项目名称:DetNAS,代码行数:17,代码来源:test_detectors.py


注:本文中的utils.load_config_from_file方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。