Load pretrained model error


(赵琰) #1

Hi,

I am loading a pretrained model (902M)and encountered some error. With a smaller model will be ok
I would appreciate for someone help .Thank you.

Traceback (most recent call last):
File “main.py”, line 40, in
model, parameters = generate_model(opt)
File “/home/zhaoyan/self_3D-ResNets-PyTorch_5/model.py”, line 106, in generate_model
pretrain = torch.load(opt.pretrain_path)
File “/home/zhaoyan/.local/lib/python2.7/site-packages/torch/serialization.py”, line 231, in load
return _load(f, map_location, pickle_module)
File “/home/zhaoyan/.local/lib/python2.7/site-packages/torch/serialization.py”, line 386, in _load
deserialized_objects[key]._set_from_file(f, offset)
RuntimeError: storage has wrong size: expected -5033425001016997258 got 512


(Vincent Zhang) #2

problem solved: the pth file is not complete, and need redownload. @sophia_zy


(Karl) #3

Excuse me!I meet the same problem when I am loading a pretrained model (553MB) : RuntimeError: storage has wrong size: expected 0 got 1. Do you solve the problem now? I would appreciate for your help.Thank you.


(Sambny Song) #4

have you solve your problem? when i use multi-gpu training i have been stuck at the same place.