Open lihuinian opened 11 months ago
root@autodl-container-7dd911a9fa-736d39ee:~/Image_An# python trainval.py
Starting Pretrained S_SGFormer Model SGFormer
Traceback (most recent call last):
File "trainval.py", line 135, in
self.model.load_state_dict(torch.load(model_save_path)['state_dict_ema']) Hi, please note that we take ema, so the parameters is under the key "state_dict_ema"
Starting Pretrained B_SGFormer Model SGFormer Traceback (most recent call last): File "trainval.py", line 135, in
main()
File "trainval.py", line 56, in main
model = build_model(cfg)
File "/root/Image_An/model/build.py", line 39, in build_model
model = SGFormerModel(cfg)
File "/root/Image_An/model/model.py", line 22, in init
self.model.load_state_dict(torch.load(model_save_path))
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 705, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 243, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory