Commit 6c4851a0 authored by Ilya Ovodov's avatar Ilya Ovodov

param.txt moved to model_name directory

parent a0ccc3cf
...@@ -103,6 +103,8 @@ class AttrDict(OrderedDict): ...@@ -103,6 +103,8 @@ class AttrDict(OrderedDict):
if not can_overwrite: if not can_overwrite:
assert not os.path.exists(file_name), "Can't save parameters to {}: File exists".format(params_fn) assert not os.path.exists(file_name), "Can't save parameters to {}: File exists".format(params_fn)
if create_dirs: if create_dirs:
dir_name = os.path.dirname(os.path.dirname(file_name))
os.makedirs(dir_name, exist_ok=True)
dir_name = os.path.dirname(file_name) dir_name = os.path.dirname(file_name)
os.makedirs(dir_name, exist_ok=True) os.makedirs(dir_name, exist_ok=True)
with open(file_name, 'w+') as f: with open(file_name, 'w+') as f:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment