0

I am trying to do Convolutional Neural Network using tensorflow. I am using tflearn for this. I have downloaded the data from this site

Traceback (most recent call last):
File "C:/Users/Sukumar/Python/ML/cnn_tflearn.py", line 7, in <module>
X, Y, test_x, test_y = mnist.load_data(one_hot=True)
File "C:\Users\Sukumar\Miniconda3\lib\site-packages\tflearn\datasets\mnist.py", line 15, in load_data
mnist = read_data_sets("mnist/", one_hot=one_hot)
File "C:\Users\Sukumar\Miniconda3\lib\site-packages\tflearn\datasets\mnist.py", line 161, in read_data_sets
train_images = extract_images(local_file)
File "C:\Users\Sukumar\Miniconda3\lib\site-packages\tflearn\datasets\mnist.py", line 50, in extract_images
buf = bytestream.read(rows * cols * num_images)
File "C:\Users\Sukumar\Miniconda3\lib\gzip.py", line 274, in read
return self._buffer.read(size)
TypeError: only integer scalar arrays can be converted to a scalar index
suku
  • 10,507
  • 16
  • 75
  • 120
  • The script usually downloads the data by itself. Could you try that? – drpng Feb 18 '17 at 23:52
  • I did that too, but I am still getting the same error...some stackoverflow qn said that the file may be corrupted while downloading and result in this error – suku Feb 19 '17 at 00:51
  • You could try to file a bug against the tflearn github, which is not managed by the tensorflow team. There is a `load_mnist` in our contrib [directory](https://www.github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/datasets/mnist.py#L267), so you could try that. – drpng Feb 19 '17 at 01:31

1 Answers1

0

The MNIST files will work with the GPU-supported TensorFlow version that uses NVIDIA cuDNN, and here is a post about installing them How to verify CuDNN installation?.

cycle_about
  • 325
  • 1
  • 3
  • 6