本文整理汇总了Python中cfgs.config_common.get_args_for_mode_building方法的典型用法代码示例。如果您正苦于以下问题:Python config_common.get_args_for_mode_building方法的具体用法?Python config_common.get_args_for_mode_building怎么用?Python config_common.get_args_for_mode_building使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfgs.config_common
的用法示例。
在下文中一共展示了config_common.get_args_for_mode_building方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_args_for_config
# 需要导入模块: from cfgs import config_common [as 别名]
# 或者: from cfgs.config_common import get_args_for_mode_building [as 别名]
def get_args_for_config(config_name):
args = get_default_args()
config_name, mode = config_name.split('+')
vars = get_vars(config_name)
logging.info('config_name: %s, mode: %s', config_name, mode)
args.buildinger.task_params.n_ori = int(vars[2])
args.solver.freeze_conv = True
args.solver.pretrained_path = resnet_v2_50_path
args.buildinger.task_params.img_channels = 5
args.solver.data_loss_wt = 0.00001
if vars[0] == 'v0':
None
else:
logging.error('config_name: %s undefined', config_name)
args.buildinger.task_params.height = args.buildinger.camera_param.height
args.buildinger.task_params.width = args.buildinger.camera_param.width
args.buildinger.task_params.modalities = args.buildinger.camera_param.modalities
if vars[1] == 'all':
args = cc.get_args_for_mode_building_all(args, mode)
elif vars[1] == 'noall':
args = cc.get_args_for_mode_building(args, mode)
# Log the arguments
logging.error('%s', args)
return args
示例2: get_args_for_config
# 需要导入模块: from cfgs import config_common [as 别名]
# 或者: from cfgs.config_common import get_args_for_mode_building [as 别名]
def get_args_for_config(config_name):
args = get_default_args()
config_name, mode = config_name.split('+')
vars = get_vars(config_name)
logging.info('config_name: %s, mode: %s', config_name, mode)
args.buildinger.task_params.n_ori = int(vars[2])
args.solver.freeze_conv = True
args.solver.pretrained_path = rgb_resnet_v2_50_path
args.buildinger.task_params.img_channels = 5
args.solver.data_loss_wt = 0.00001
if vars[0] == 'v0':
None
else:
logging.error('config_name: %s undefined', config_name)
args.buildinger.task_params.height = args.buildinger.camera_param.height
args.buildinger.task_params.width = args.buildinger.camera_param.width
args.buildinger.task_params.modalities = args.buildinger.camera_param.modalities
if vars[1] == 'all':
args = cc.get_args_for_mode_building_all(args, mode)
elif vars[1] == 'noall':
args = cc.get_args_for_mode_building(args, mode)
# Log the arguments
logging.error('%s', args)
return args