python pickle UnicodeDecodeError

独自空忆成欢 提交于 2019-12-03 05:55:06
Nisitha Jayatilleka

As stated the main problem turned out to be incompatibility between python 2.x cPickle and python 3.x pickle.

setting the encoding to 'latin-1' seems to work.

training_data, validation_data, test_data = pickle.load(f, encoding='latin1')

Answer here helped a lot: Pickle incompatability of numpy arrays between Python 2 and 3

You can try this:

  import chainer  
  train, test = chainer.datasets.get_mnist(ndim=1)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!