Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory: './runs/PANet_VOC_sets_0_1way_1shot_[train]/1/snapshots/30000.pth #50

Open
al3ms opened this issue May 9, 2023 · 1 comment

Comments

@al3ms
Copy link

al3ms commented May 9, 2023

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_1way_1shot
[train]/1/snapshots/30000.pth'

@fewshotstudy
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants