tensorflow / skflow

Simplified interface for TensorFlow (mimicking Scikit Learn) for Deep Learning
Apache License 2.0
3.18k stars 441 forks source link

Exception when running language model example #156

Closed savkov closed 7 years ago

savkov commented 8 years ago

Hi,

Thanks for making this tool. It will definitely make things easier for NN newcomers.

I just tried running your language model example and got the following exception:

Traceback (most recent call last):
  File "test.py", line 84, in <module>
    estimator.fit(X, y)
  File "/Users/aleksandar/tensorflow/lib/python3.5/site-packages/skflow/estimators/base.py", line 243, in fit
    feed_params_fn=self._data_feeder.get_feed_params)
  File "/Users/aleksandar/tensorflow/lib/python3.5/site-packages/skflow/trainer.py", line 114, in train
    feed_dict = feed_dict_fn()
  File "/Users/aleksandar/tensorflow/lib/python3.5/site-packages/skflow/io/data_feeder.py", line 307, in _feed_dict_fn
    inp[i, :] = six.next(self.X)
StopIteration

I made sure that my python distribution has the correct version of six. I tried running it both in a virtual environment and in a normal Python 3 distro. Any ideas what might be causing this?

GameOfThrow commented 8 years ago

could be a tensorflow/skflow version issue, can you specify the version/check for updates?

mmarklar commented 8 years ago

I'm also getting the same exception on Tensorflow 0.7.1 and Skflow 0.1.0

Also tried with nightly of TF using the contrib.skflow, same result. Let me know if anything else would be useful.

mdasadul commented 8 years ago

I am also getting same error as well

ilblackdragon commented 8 years ago

Hi,

Sorry for slow response.

Can you try doing print(six.next(X)) in language_model.py before ### Model section? To just see what happen with data. On Python2 seems to work, I'll double check on Python3.

rasmushaglund commented 8 years ago

I'm getting the same error in both 0.8 and 0.9rc1. @ilblackdragon when running the above command before the model section it works fine, but then fails on the last line. I'm running Python 2.7

rasmushaglund commented 8 years ago

I tried finding the source, and this is what I found: https://github.com/tensorflow/tensorflow/commit/30573c21e067ad7ec2bd74c062505d0506a36d57#commitcomment-17868872

ilblackdragon commented 7 years ago

This may be fixed now with refactoring to use MonitoredSession.

If not, please re-file bug at tensorflow repository - this one is inactive. Thanks!