594422814/UDT_pytorch

Can't load pretrained models

mphillips-valleyit opened this issue · 3 comments

When I run the test command

python UDT.py --model ../train/work/checkpoint.pth.tar

I get

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdb in position 0: invalid continuation byte

in load_param of track/net.py. Using PyTorch 1.6, Python 3.6. Same result with PyTorch 0.4. Any thoughts on why it won't work? I note that the model files seem really small (83K).

Same here

Hi, @mphillips-valleyit
I solved problem.

At the 64th line of 'track/net.py', modify
checkpoint = torch.load(path, encoding='ISO-8859-1')

But I don't know why the encoder 'utf-8' has a problem.

Nice work @zzapzzap ! Your change solved it for me as well.