-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The main.py didn't create temp directory by itself in my computer. Here is the trace:
********* FOLD 0 *********
Epoch: 0 | example.npy Rep: 52.92 | KL: 0.26 | Time Elapsed: 0.50 |
Epoch: 10 | example.npy Rep: 43.02 | KL: 0.25 | Time Elapsed: 3.14 |
Epoch: 20 | example.npy Rep: 34.71 | KL: 0.22 | Time Elapsed: 3.15 |
Epoch: 30 | example.npy Rep: 28.10 | KL: 0.19 | Time Elapsed: 3.17 |
Epoch: 40 | example.npy Rep: 23.14 | KL: 0.16 | Time Elapsed: 3.36 |
Epoch: 50 | example.npy Rep: 19.54 | KL: 0.13 | Time Elapsed: 3.45 |
ERROR occured
Traceback (most recent call last):
File "main.py", line 5, in
MGN_NET.train_model(n_max_epochs = 100,
File "/home/phoenix/Desktop/MICCAI/MGN-Net/model.py", line 314, in train_model
model.load_state_dict(torch.load(restore))
File "/home/phoenix/workspace/venv/lib/python3.8/site-packages/torch/serialization.py", line 581, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/phoenix/workspace/venv/lib/python3.8/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/phoenix/workspace/venv/lib/python3.8/site-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './temp/weight_43c92ba3-c73f-46c6-b8c6-384960d3acb7_19.53.model'
It might be better to invoke a function to create 'temp' directory before everything. I didn't want to open a PR for this, since it seems a typo/little issue. Best regards,