You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full disclosure: I'm not using the Docker image, but working in my own environment on a Mac (10.12.2) with Python 2.7 (via Homebrew) and Tensorflow 0.12.1.
I'm going through the code for Episode 7, where I get an "IndexError: invalid index to scalar variable" on the line classifier.fit(data, labels, batch_size=100, steps=1000). Here's my code in full (exactly same as the tutorial):
Traceback (most recent call last):
File "/Users/mbaytas/Dropbox/works-code/ml-studies/google-recipes/ep7-mnist/ep7.py", line 38, in <module>
classifier.fit(data, labels, batch_size=100, steps=1000)
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/linear.py", line 446, in fit
max_steps=max_steps)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 191, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 355, in fit
max_steps=max_steps)
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 733, in _train_model
max_steps=max_steps)
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/graph_actions.py", line 300, in _monitored_train
_, loss = super_sess.run([train_op, loss_op], feed_fn() if feed_fn else
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py", line 407, in _feed_dict_fn
out[i] = _access(self._y, sample)
File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py", line 208, in _access
return data[iloc]
IndexError: invalid index to scalar variable.
The text was updated successfully, but these errors were encountered:
mbaytas
changed the title
In ep7 classifier.fit() raises IndexError: invalid index to scalar variable
In ep7 classifier.fit() raises "IndexError: invalid index to scalar variable"
Jan 24, 2017
Full disclosure: I'm not using the Docker image, but working in my own environment on a Mac (10.12.2) with Python 2.7 (via Homebrew) and Tensorflow 0.12.1.
I'm going through the code for Episode 7, where I get an "
IndexError: invalid index to scalar variable
" on the lineclassifier.fit(data, labels, batch_size=100, steps=1000)
. Here's my code in full (exactly same as the tutorial):Here's the complete error:
The text was updated successfully, but these errors were encountered: