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
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读取模型作了兼容 但仍然出现了问题