问题:
with open(filename, 'rb') as f:
----> 9 datadict = pickle.load(f) 10 X = datadict['data'] 11 Y = datadict['labels']UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 6: ordinal not in range(128)
解决办法:
with open(filename, 'rb') as f:
datadict = pickle.load(f,encoding='iso-8859-1') X = datadict['data'] Y = datadict['labels']
具体原因是为毛,后面再研究。先记录一下该问题。