Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error TypeError when running ... #6

Open
johnirit opened this issue Feb 15, 2017 · 2 comments
Open

Error TypeError when running ... #6

johnirit opened this issue Feb 15, 2017 · 2 comments

Comments

@johnirit
Copy link

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
Copy link

I think it's because of new TF version.

@kasiraov
Copy link

kasiraov commented Jun 1, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants