getting unicode decode error while trying to load pre-trained model using torch.load(PATH)
Trying to load a ResNet 18 pre-trained model using the torch.load(PATH) but getting Unicode decode error please help.

Traceback (most recent call last):
  File "main.py", line 312, in &lt;module&gt;
    main()
  File "main.py", line 138, in main
    checkpoint = torch.load(args.resume)
  File "F:\InsSoft\Anaconda\lib\site-packages\torch\serialization.py", line 593, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "F:\InsSoft\Anaconda\lib\site-packages\torch\serialization.py", line 773, in _legacy_load
    result = unpickler.load()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 2: invalid start byte


This error hits whenever the model is pretrained on torch version &lt; 0.4 but using torch version &gt; 0.4 for testing / resuming.
so use checkpoint = torch.load(args.resume,encoding='latin1')
