- UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 0: ordinal not in range(128)
import pickle
with open("data\\squeeze_net\\model.pkl",'rb') as f:
content = pickle.load(f, encoding='iso-8859-1')
print(content)
# 原来报错的内容
with open('dataset5.pkl', 'rb') as f:
train_set = pickle.load(f) # 就是这里!
即改变编码方式即可,建议直接采用这种方法