Closed cclauss closed 5 years ago
'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128) I am still getting this error. can someone help me solve this. I am using windows and python 2 does not have pytorch.
I solved the ascii codec cant decode byte 0xc3 using this response: https://github.com/CSAILVision/places365/issues/25#issuecomment-333871990
from functools import partial
import pickle
pickle.load = partial(pickle.load, encoding="latin1")
pickle.Unpickler = partial(pickle.Unpickler, encoding="latin1")
model = torch.load(model_file, map_location=lambda storage, loc: storage, pickle_module=pickle)
I just added the .cuda() option after load
model = torch.load('src/models/hgreg-3d.pth', map_location=lambda storage, loc: storage, pickle_module=pickle).cuda()
I hope this helps!
Make the minimal, safe changes required to convert the repo's code to be syntax compatible with both Python 2 and Python 3. There might be other changes required to complete a port to Python 3 but this PR is a minimal, safe first step.
Run: futurize --stage1 -w */.py