python - zlib.error: Error -3 while decompressing: invalid distance code -


i trying create model using tensorflow using mnist dataset . have installed tensorflow , when try create model using command .

python convolutional.py 

i getting error message on console :

successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes. downloaded train-labels-idx1-ubyte.gz 28881 bytes. downloaded t10k-images-idx3-ubyte.gz 1648877 bytes. downloaded t10k-labels-idx1-ubyte.gz 4542 bytes. extracting data/train-images-idx3-ubyte.gz traceback (most recent call last):   file "convolutional.py", line 316, in <module>     tf.app.run()   file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py", line 30, in run     sys.exit(main(sys.argv))   file "convolutional.py", line 128, in main     train_data = extract_data(train_data_filename, 60000)   file "convolutional.py", line 75, in extract_data     buf = bytestream.read(image_size * image_size * num_images)   file "/usr/lib/python2.7/gzip.py", line 261, in read     self._read(readsize)   file "/usr/lib/python2.7/gzip.py", line 312, in _read     uncompress = self.decompress.decompress(buf) zlib.error: error -3 while decompressing: invalid block type 

i using python2.7 installed in 14.04 ubuntu operating system .

it seems source of problem invalid data file: "data/train-images-idx3-ubyte.gz". there way fresh copy of file? please validate new copy of file using following shell command:

gunzip -t  data/train-images-idx3-ubyte.gz 

once above test return answer gz file valid, execute script:

python convolutional.py 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -