-
Notifications
You must be signed in to change notification settings - Fork 758
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
Import error with tensorflow r1.8 #893
Comments
This is related to issue 882. I replaced the import line edward/util/random_variables.py#L15 with
as it seems like the function has been renamed here. Not sure if it is necessary to use it, but at least this quickfix makes it possible to use tensorflow 1.8 (I haven't run many tests, just got it to work) |
Why has this not been turned into a pull request? |
I am new to TF and Edward. I conda/pip installed TF and Edward according the "Get Started" recommendations. Then I ran Jupyter and got this same error: import matplotlib.pyplot as plt import edward as ed from edward.models import Normal plt.style.use('ggplot')ImportError Traceback (most recent call last) c:\users\claus\src\edward\edward_init_.py in () c:\users\claus\src\edward\edward\criticisms_init_.py in () c:\users\claus\src\edward\edward\criticisms\evaluate.py in () c:\users\claus\src\edward\edward\util_init_.py in () c:\users\claus\src\edward\edward\util\random_variables.py in () ImportError: cannot import name 'set_shapes_for_outputs' |
I am having the same issue too. I am running on Python 2.7.12, tensorflow 1.8.0, and I just installed edward 1.14.3. I am running on mac OS X 10.13.4. I type
And then I got the following message:
|
With lars's solution, the Bayesian Linear regression example gives an error. reconstruct_sequence_inputs(self, op_def, inputs, attrs) |
I got the same error. Tensorflow: 1.11.0 |
I got the same issue. edward-1.3.5 |
tf version 1.12.0 Getting the same issue. quick fix was to use pipenv install 'tensorflow<=1.7.*' |
Is there any other quick fix not requiring to downgrade TF? |
I guess you currently should use tensorflow-probability, which contains edward2. |
Same error. Solved by downgrading tensorflow to 1.7.0. |
tensorflow r1.8 does not seem to have "set_shapes_for_outputs" and an error occurs when importing edward.
from tensorflow.python.framework.ops import set_shapes_for_outputs
in edward/edward/util/random_variables.py
https://github.com/blei-lab/edward/blob/master/edward/util/random_variables.py#L15
Just comment out "from tensorflow.python.framework.ops import set_shapes_for_outputs" and following lines does not work.
https://github.com/blei-lab/edward/blob/master/edward/util/random_variables.py#L404
How to be implemented this function without set_shapes_for_outputs?
The text was updated successfully, but these errors were encountered: