Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiefy authored Aug 18, 2022
1 parent 2ba06a0 commit a692462
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a692462

Please sign in to comment.