def main(_argv): model_configs = maybe_load_yaml(DEFAULT_INFER_CONFIGS) # load flags from config file model_configs = load_from_config_path(FLAGS.config_paths, model_configs) # replace parameters in configs_file with tf FLAGS model_configs = update_infer_model_configs(model_configs, FLAGS) model_dirs = FLAGS.model_dir.strip().split(",") if len(model_dirs) == 1: model_configs = deep_merge_dict(model_configs, ModelConfigs.load(model_dirs[0])) model_configs = update_infer_model_configs(model_configs, FLAGS) runner = InferExperiment(model_configs=model_configs) else: runner = EnsembleExperiment(model_configs=model_configs, model_dirs=model_dirs, weight_scheme=FLAGS.weight_scheme) runner.run()
def main(_argv): model_configs = maybe_load_yaml(DEFAULT_INFER_CONFIGS) # load flags from config file model_configs = load_from_config_path(FLAGS.config_paths, model_configs) # replace parameters in configs_file with tf FLAGS model_configs = update_infer_model_configs(model_configs, FLAGS) model_dirs = FLAGS.model_dir.strip().split(",") if len(model_dirs) == 1: model_configs = deep_merge_dict(model_configs, ModelConfigs.load(model_dirs[0])) runner = InferExperiment(model_configs=model_configs) else: runner = EnsembleExperiment(model_configs=model_configs, model_dirs=model_dirs, weight_scheme=FLAGS.weight_scheme) runner.run()
def default_inference_options(): """ Returns a dictionary of default inference options. """ return InferExperiment.default_inference_options()