llSourcell / tensorflow_demo

Tensorflow Demo for my TF in 5 Min Video on Youtube
229 stars 174 forks source link

Error TypeError when running ... #6

Open johnirit opened 7 years ago

johnirit commented 7 years ago

Hi,

I've this error, any idea ?

'Extracting', '/tmp/data/train-images-idx3-ubyte.gz')
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
  File "/Users/Sylar/Desktop/Copietex/input_data.py", line 150, in read_data_sets
    train_images = extract_images(local_file)
  File "/Users/Sylar/Desktop/Copietex/input_data.py", line 40, in extract_images
    buf = bytestream.read(rows * cols * num_images)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 275, in read
    chunk = self.extrabuf[offset: offset + size]
TypeError: only integer scalar arrays can be converted to a scalar index
vmarkushin commented 7 years ago

I think it's because of new TF version.

kasiraov commented 6 years ago

I am also facing similar issue with tensor flow version 1.8.0. Could some one tell the correct version to use?

Traceback (most recent call last): File "board.py", line 2, in mnist = input_data.read_data_sets("/Kasi/machine_learning/ml_read/", one_hot=True) File "/Kasi/machine_learning/input_data.py", line 156, in read_data_sets train_images = extract_images(local_file) File "/Kasi/machine_learning/input_data.py", line 43, in extract_images buf = bytestream.read(rows cols num_images) File "/usr/lib/python2.7/gzip.py", line 268, in read chunk = self.extrabuf[offset: offset + size] TypeError: only integer scalar arrays can be converted to a scalar index