from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
При использовании MNIST от tenorflow я получил следующую проблему:
Extracting MNIST_data/train-images-idx3-ubyte.gz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tianqing/.conda/envs/python35/lib/python3.5/site-
packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 229,
in read_data_sets
train_images = extract_images(f)
File "/home/tianqing/.conda/envs/python35/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 53, in extract_images
magic = _read32(bytestream)
File "/home/tianqing/.conda/envs/python35/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 35, in _read32
return numpy.frombuffer(bytestream.read(4), dtype=dt)[0]
File "/home/tianqing/.conda/envs/python35/lib/python3.5/gzip.py", line 274, in read
return self._buffer.read(size)
File "/home/tianqing/.conda/envs/python35/lib/python3.5/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/home/tianqing/.conda/envs/python35/lib/python3.5/gzip.py", line 469, in read
uncompress = self._decompressor.decompress(buf, size)
zlib.error: Error -3 while decompressing data: invalid distance too far back
Я обнаружил, что это проблема zlib, но не могу помочь с переполнением стека. Есть ли возможные решения?