kaixin96 / PANet

Code for our ICCV 2019 paper PANet: Few-Shot Image Semantic Segmentation with Prototype Alignment
322 stars 64 forks source link

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

Open al3ms opened 1 year ago

al3ms commented 1 year ago

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'

fewshotstudy commented 8 months ago

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