tbepler / protein-sequence-embedding-iclr2019

Source code for "Learning protein sequence embeddings using information from structure" - ICLR 2019
Other
253 stars 75 forks source link

Unable to load pretrained model? #7

Closed YamamotoSayaka closed 5 years ago

YamamotoSayaka commented 5 years ago

Hi, thanks again for sharing this code. However, I'm unable to load the pretrained model provided here. It gives me the following error

Traceback (most recent call last): File "eval_contact_casp12.py", line 462, in main() File "eval_contact_casp12.py", line 326, in main model = torch.load(args.model) File "/root/Anacondas/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 358, in load return _load(f, map_location, pickle_module) File "/root/Anacondas/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 532, in _load magic_number = pickle_module.load(f) _pickle.UnpicklingError: invalid load key, '\x1f'.

BTW, I'm using python 3 and pytorch 0.4.1, training works fine for me. Any suggestions?

tbepler commented 5 years ago

Are you still having this problem? If so, have you tried redownloading the model files? It's possible that this is due to corruption of the saved model file.

YamamotoSayaka commented 5 years ago

Hi @tbepler , unfortunately I'm still having this problem. The file I downloaded is 495mb, and the md5 is f0decef5fe4e404398b7672f1c95fabd. The only change I made in the code is to change '--model' flag to './pretrained_models.tar.gz'.

tbepler commented 5 years ago

Ah, you need to unzip the pretrained models first! There are a few pretrained models in that tar file.

YamamotoSayaka commented 5 years ago

@tbepler ahhh I get it. Many thanks! Thought that I can direcly torch.load from it