def _get_config(): config = get_default_config() params = { "model.py": "example_model.model_multimodal:GCN", "save_result_test": "../result/test.multimodal.csv", "save_result_train": "../result/train.multimodal.csv", "load_model": "../model/model.sample_multimodal.ckpt", "save_model": "../model/model.sample_multimodal.ckpt", "validation_data_rate": 0.3, "embedding_dim": 4, "epoch": 1, "with_feature": True, "batch_size": 10, "save_interval": 10, "learning_rate": 0.3, "with_node_embedding": False, "save_model_path": "model", "patience": 0, "dataset": "../example_jbl/sample.jbl" } for k, v in params.items(): config[k] = v return config
default=None, nargs='?', help='config json file') parser.add_argument('--save-config', default=None, nargs='?', help='save config json file') parser.add_argument('--no-config', action='store_true', help='use default setting') parser.add_argument('--model', type=str, default=None, help='model') parser.add_argument('--dataset', type=str, default=None, help='dataset') args = parser.parse_args() # config config = get_default_config() if args.config is None: pass #parser.print_help() #quit() else: print("[LOAD] ", args.config) fp = open(args.config, 'r') config.update(json.load(fp)) # option if args.model is not None: config["load_model"] = args.model if args.dataset is not None: config["dataset"] = args.dataset # setup with tf.Graph().as_default():