google / seq2seq

A general-purpose encoder-decoder framework for Tensorflow
https://google.github.io/seq2seq/
Apache License 2.0
5.61k stars 1.3k forks source link

ImportError: cannot import name 'bernoulli' #259

Open nrawal-welocalize opened 7 years ago

nrawal-welocalize commented 7 years ago

tensorflow_error_test

0b01 commented 7 years ago

My guess is you are using tensorflow 1.2

You need to change some API calls according to https://github.com/google/seq2seq/pull/254

soukira commented 7 years ago

@rickyhan I am having the same error as @nrawal-welocalize . And you are right my version of tensorflow is 1.2 , Is there a way that I could install an older version of tensorflow

soukira commented 7 years ago

I have made all the changes as suggested in #254 , and the same error is displayed , is there something I am missing???

soukira commented 7 years ago

After all the changes , these new errors pop up File "C:\Python\Python35\Lib\site-packages\seq2seq\seq2seq\contrib\experiment.py", line 104, in continuous_train_and_eval monitors=self._train_monitors) File "C:\Python\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", line 289, in new_func return func(*args, **kwargs) File "C:\Python\Python35\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 455, in fit loss = self._train_model(input_fn=input_fn, hooks=hooks) File "C:\Python\Python35\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1003, in _train_model config=self._session_config File "C:\Python\Python35\lib\site-packages\tensorflow\python\training\monitored_session.py", line 352, in MonitoredTrainingSession stop_grace_period_secs=stop_grace_period_secs) File "C:\Python\Python35\lib\site-packages\tensorflow\python\training\monitored_session.py", line 648, in init stop_grace_period_secs=stop_grace_period_secs) File "C:\Python\Python35\lib\site-packages\tensorflow\python\training\monitored_session.py", line 470, in init h.begin() File "C:\Python\Python35\Lib\site-packages\seq2seq\seq2seq\training\hooks.py", line 246, in begin opts = tf.contrib.tfprof.model_analyzer.TRAINABLE_VARS_PARAMS_STAT_OPTIONS AttributeError: module 'tensorflow.contrib.tfprof' has no attribute 'model_analyzer'


Ran 2 tests in 9.513s

FAILED (errors=1)

darrengarvey commented 7 years ago

@soukira - Not sure why that doesn't work for you, it works fine here.

What about trying these:

python -c "import tensorflow as tf; print(tf.VERSION, tf.GIT_VERSION, tf.__file__)"
python -c "import tensorflow as tf; print(tf.contrib.tfprof.model_analyzer.TRAINABLE_VARS_PARAMS_STAT_OPTIONS)"

I get 1.2.0 b'v1.2.0-1369-g7786731 /path/to/site-packages/tensorflow/__init__.py' (although I'm on a version built myself) and a bunch of JSON from the second command.

Did you perhaps do a local install of TF 1.2 and not overwrite the one under \Python\Python35\lib\...?

soukira commented 7 years ago

Thanks for your reply. This problem has been solved i should close it now, My problem is now with the tf.contrib and i have raised an issue under github and heard its not supported on windows module yet.

On Tue, Jun 27, 2017 at 11:37 PM, Darren Garvey notifications@github.com wrote:

@soukira https://github.com/soukira - Not sure why that doesn't work for you, it works fine here.

What about trying these:

python -c "import tensorflow as tf; print(tf.VERSION, tf.GIT_VERSION, tf.file)" python -c "import tensorflow as tf; print(tf.contrib.tfprof.model_analyzer.TRAINABLE_VARS_PARAMS_STAT_OPTIONS)"

I get 1.2.0 b'v1.2.0-1369-g7786731 /path/to/site-packages/ tensorflow/init.py' (although I'm on a version built myself) and a bunch of JSON from the second command.

Did you perhaps do a local install of TF 1.2 and not overwrite the one under \Python\Python35\lib...?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/seq2seq/issues/259#issuecomment-311439161, or mute the thread https://github.com/notifications/unsubscribe-auth/AYtdaTwETdT8uq94KI6JRuRPC95Zf9k0ks5sIUTigaJpZM4N-blh .

linzhp commented 7 years ago

So does it mean that this library is not supported on Windows?

miko8422 commented 2 years ago

really?o, should i run this on my linux visual machine? i didn't solve this problem,and get the same json code below,there is no other way of solveing this problem?