Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

ImportError: cannot import name 'bernoulli' #259

Open
nrawal-welocalize opened this issue Jun 19, 2017 · 8 comments
Open

ImportError: cannot import name 'bernoulli' #259

nrawal-welocalize opened this issue Jun 19, 2017 · 8 comments

Comments

@nrawal-welocalize
Copy link

tensorflow_error_test

@0b01
Copy link

0b01 commented Jun 19, 2017

My guess is you are using tensorflow 1.2

You need to change some API calls according to #254

@soukira
Copy link

soukira commented Jun 24, 2017

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

soukira commented Jun 24, 2017

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

@soukira
Copy link

soukira commented Jun 25, 2017

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

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

soukira commented Jun 28, 2017 via email

@linzhp
Copy link

linzhp commented Jul 21, 2017

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

@miko8422
Copy link

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?

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

No branches or pull requests

6 participants