ruotianluo / ImageCaptioning.pytorch

I decide to sync up this repo and self-critical.pytorch. (The old master is in old master branch for archive)
MIT License
1.45k stars 416 forks source link

Decoding problem of pickle file of model #94

Open xautdqhx opened 4 years ago

xautdqhx commented 4 years ago

When the pickle file is loaded by pickle.load(f,encoding=’utf-8’), an error generated as following: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte.

When the pickle file is loaded by pickle.load(f), an error generated as following: UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0: ordinal not in range(128).

ruotianluo commented 4 years ago

Do you mind use the functions here https://github.com/ruotianluo/ImageCaptioning.pytorch/blob/master/captioning/utils/misc.py#L21 ?