0

Look at http://deeplearning.net/tutorial/gettingstarted.html

I use python3.5 to write the code in windows 7

import pickle, gzip, numpy

f = gzip.open('mnist.pkl.gz', 'rb')
train_set, vaild_set, test_set = pickle.load(f)
f.close()

But I get the error:

Traceback (most recent call last):
  File "e:\python_workspace\theanoTest\DataSet.py", line 7, in <module>
    train_set, vaild_set, test_set = pickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 614: ordinal not in range(128)

But in python3 the default encode is 'utf-8'

import sys
print(sys.getdefaultencoding())

So I don't know why does the error occur?

Gauss
  • 379
  • 5
  • 18

0 Answers0