Load pretrained model error

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

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

2 Likes

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.

1 Like

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

As @Vincent_Zhang said you need to download the weight files again (or regenerate them).