本文整理匯總了Python中cfgs.config_cmp.get_args_for_config方法的典型用法代碼示例。如果您正苦於以下問題:Python config_cmp.get_args_for_config方法的具體用法?Python config_cmp.get_args_for_config怎麽用?Python config_cmp.get_args_for_config使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cfgs.config_cmp
的用法示例。
在下文中一共展示了config_cmp.get_args_for_config方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_args_for_config
# 需要導入模塊: from cfgs import config_cmp [as 別名]
# 或者: from cfgs.config_cmp import get_args_for_config [as 別名]
def get_args_for_config(config_name):
configs = config_name.split('.')
type = configs[0]
config_name = '.'.join(configs[1:])
if type == 'cmp':
args = config_cmp.get_args_for_config(config_name)
args.setup_to_run = cmp.setup_to_run
args.setup_train_step_kwargs = cmp.setup_train_step_kwargs
elif type == 'bl':
args = config_vision_baseline.get_args_for_config(config_name)
args.setup_to_run = vision_baseline_lstm.setup_to_run
args.setup_train_step_kwargs = vision_baseline_lstm.setup_train_step_kwargs
else:
logging.fatal('Unknown type: {:s}'.format(type))
return args
示例2: _setup_args
# 需要導入模塊: from cfgs import config_cmp [as 別名]
# 或者: from cfgs.config_cmp import get_args_for_config [as 別名]
def _setup_args(config_name, logdir):
args = get_args_for_config(config_name)
args.solver.num_workers = FLAGS.num_workers
args.solver.task = FLAGS.task
args.solver.ps_tasks = FLAGS.ps_tasks
args.solver.master = FLAGS.master
args.solver.seed = FLAGS.solver_seed
args.logdir = logdir
args.navtask.logdir = None
return args