本文整理匯總了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