Closed ZLCQ closed 4 years ago
You can try to add the following code at the beginning of net.py:
from functools import partial
import pickle
pickle.load = partial(pickle.load, encoding="latin1")
pickle.Unpickler = partial(pickle.Unpickler, encoding="latin1")
It works,thank you very much.
I add the code in net.py, but there has other mistake occurs:
Traceback (most recent call last):
File "E:/Person_Tracking/TA/_Siamese/UDT/UDT_pytorch/track/UDT.py", line 123, in
you can modify _if 'module' in statedict.keys()[0]: to _if 'module' in list(statedict.keys())[0]: @Clannad000000
Hi, When I ran the command 'python UDT.py --model ../train/work/checkpoint.pth.tar', some mistakes occurred:
Traceback (most recent call last): File "UDT.py", line 122, in
net.load_param(args.model)
File "/home/wy/UDT_pytorch/track/net.py", line 64, in load_param
checkpoint = torch.load(path)
File "/home/wy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/torch/serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "/home/wy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/torch/serialization.py", line 574, in _load
result = unpickler.load()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)
What can I do to fix this problem? Thanks