hh23333 / PVPM

PyTorch code for CVPR'2020 paper “Pose-guided Visible Part Matching for Occluded Person ReID”
112 stars 26 forks source link

导入您提供的预训练模型时报错 #9

Closed hyhzzzz closed 4 years ago

hyhzzzz commented 4 years ago

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 163, in main() File "main.py", line 144, in main load_pretrained_weights(model, args.load_weights) File "/home/hyhzzzz/デスクトップ/PVPM-master/torchreid/utils/torchtools.py", line 281, in load_pretrained_weights checkpoint = load_checkpoint(weight_path) File "/home/hyhzzzz/デスクトップ/PVPM-master/torchreid/utils/torchtools.py", line 89, in load_checkpoint checkpoint = torch.load(fpath, map_location=map_location,pickle_module=pickle, ) File "/home/hyhzzzz/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/hyhzzzz/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load result = unpickler.load() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 1: invalid continuation byte

推测是由于我的环境是python3导致 但阅读代码似乎已对python3读取模型作了兼容 但仍然出现了问题

hyhzzzz commented 4 years ago

我查了一些资料 关于这个兼容问题 其给的解决方案和代码中的兼容写法几乎一模一样 但似乎并不起作用

hh23333 commented 4 years ago

参考issue#11 ,可能是因为模型的问题,如果使用python3,建议重新训一下,不要使用我提供的模型