CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.51k stars 7.84k forks source link

Ch2, tensorflow import issue #524

Open worthy7 opened 2 years ago

worthy7 commented 2 years ago

Hi there, I was tryting to just run all cells on the tensorflow chapter 2 book, and it hits this error right at the start.

AttributeError                            Traceback (most recent call last)
<ipython-input-2-e7f38f79c510> in <module>()
     38 
     39 import tensorflow as tf
---> 40 tfe = tf.contrib.eager
     41 
     42 # Eager Execution

AttributeError: module 'tensorflow' has no attribute 'contrib'
jonwarghed commented 2 years ago

Yes the code is written for tensorflow 1 not tensorflow 2