I want to try test.py but when I run it, I get this error:
INFO - PANet - Running command 'main'
INFO - PANet - Started run with ID "2"
INFO - main - ###### Create model ######
ERROR - PANet - Failed after 0:00:13!
Traceback (most recent calls WITHOUT Sacred internals):
File "/content/drive/MyDrive/sofa/PANet/test.py", line 42, in main
model.load_state_dict(torch.load(_config['snapshot'], map_location='cpu'))
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 791, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 271, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 252, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './runs/PANet_VOC_sets_0_1way1shot[train]/1/snapshots/30000.pth'
The bug means test model cannot find file './runs/PANet_VOC_sets_0_1way_1shot[train]/1/snapshots/30000.pth'
we should note that the pth dir is the default in config.py,so you only need check the pth positon
Thanks dear for publishing the code.
I want to try test.py but when I run it, I get this error:
INFO - PANet - Running command 'main' INFO - PANet - Started run with ID "2" INFO - main - ###### Create model ###### ERROR - PANet - Failed after 0:00:13! Traceback (most recent calls WITHOUT Sacred internals): File "/content/drive/MyDrive/sofa/PANet/test.py", line 42, in main model.load_state_dict(torch.load(_config['snapshot'], map_location='cpu')) File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 791, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 271, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 252, in init super().init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './runs/PANet_VOC_sets_0_1way1shot[train]/1/snapshots/30000.pth'