twtygqyy/pytorch-SRResNet

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 918: ordinal not in range(128)

sonal-bansal opened this issue · 0 comments

UnicodeDecodeError Traceback (most recent call last)
in ()
----> 1 weights = torch.load('Saved_model//model_srresnet.pth')
2 model.load_state_dict(weights['model'].state_dict())

~\Anaconda3\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module)
301 f = open(f, 'rb')
302 try:
--> 303 return _load(f, map_location, pickle_module)
304 finally:
305 if new_fd:

~\Anaconda3\lib\site-packages\torch\serialization.py in _load(f, map_location, pickle_module)
467 unpickler = pickle_module.Unpickler(f)
468 unpickler.persistent_load = persistent_load
--> 469 result = unpickler.load()
470
471 deserialized_storage_keys = pickle_module.load(f)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 918: ordinal not in range(128)

I've also tried your previous answers of changing encoding type in serialization.py as 'latin1' , it didn't work.