yangsenius / TransPose

PyTorch Implementation for "TransPose: Keypoint localization via Transformer", ICCV 2021.
https://github.com/yangsenius/TransPose/releases/download/paper/transpose.pdf
MIT License
361 stars 58 forks source link

Unable to load the model 'tp_r_256x192_enc4_d256_h1024_mh8.pth' #2

Closed NickelRaney closed 3 years ago

NickelRaney commented 3 years ago

There is an error:

=> loading model from models/pytorch/transpose_coco/tp_r_256x192_enc4_d256_h1024_mh8.pth Traceback (most recent call last): File "/data3/wutianyi/anaconda3/envs/ipertest/lib/python3.7/tarfile.py", line 187, in nti n = int(s.strip() or "0", 8) ValueError: invalid literal for int() with base 8: 'v2\nq\x03((X'

It seems that there is something wrong with the pth file.

yangsenius commented 3 years ago

Hi, @NickelRaney. What is your PyTorch version? I recommend to use PyTorch >=1.6 to load the pre-trained models, because the pth file is saved as zip file by default in the new version of PyTorch (>=1.6).