From a6924625204d841fa6d2d7707b38a84701ca6499 Mon Sep 17 00:00:00 2001 From: FrancisHu <87693204+Francis-Komizu@users.noreply.github.com> Date: Thu, 18 Aug 2022 23:21:26 +0800 Subject: [PATCH] Update utils.py --- utils.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/utils.py b/utils.py index 56c4955..2e9a8d6 100644 --- a/utils.py +++ b/utils.py @@ -148,18 +148,12 @@ def get_hparams(init=True): parser.add_argument('-m', '--model', type=str, required=True, help='Model name') - parser.add_argument('-p', '--modeldir', type=str, default="default", - help='Directory to save models') - args = parser.parse_args() - if args.modeldir == "default": - model_dir = os.path.join("./logs", args.model) - else: - model_dir = args.modeldir - + + model_dir = os.path.join("./logs", args.model) if not os.path.exists(model_dir): os.makedirs(model_dir) - + config_path = args.config config_save_path = os.path.join(model_dir, "config.json") if init: