Recently, I was watching Mo fan’s PPO code running problems
norm_dist = tf.distributions.Normal(loc=mu, scale=sigma)
report errors:
AttributeError: module 'tensorflow' has no attribute 'distributions'
TF. Distributions is one of the core components provided by tensorflow. It is used to implement some common probability distributions and gives a series of auxiliary calculation functions.
The reason for the problem:
I didn’t look carefully. Mo fan’s version of TensorFlow is TensorFlow r1.3
his version is too old. It’s better to upgrade 1.2.0 to the same version
pay attention to the version of the code in the future
Read More:
- [Solved] Error: AttributeError: module ‘tensorflow‘ has no attribute ‘placeholder‘
- Python AttributeError: module ‘tensorflow‘ has no attribute ‘InteractiveSession‘
- [Solved] Pytorch call tensorboard error: AttributeError: module ‘tensorflow’ has no attribute ‘gfile’
- [Solved] AttributeError: module ‘tensorflow._api.v2.train‘ has no attribute ‘AdampOptimizer‘
- AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘ [How to Solve]
- [How to Solve]AttributeError: module ‘scipy’ has no attribute ‘io’
- [Solved] AttributeError: module ‘pandas‘ has no attribute ‘rolling_count‘
- [Solved] AttributeError: module ‘librosa.feature‘ has no attribute ‘inverse‘
- [Solved] AttributeError: module ‘time‘ has no attribute ‘clock‘
- [Solved] AttributeError: module ‘distutils‘ has no attribute ‘version‘
- AttributeError: module ‘time‘ has no attribute ‘clock‘ [How to Solve]
- [Solved] AttributeError: module ‘selenium.webdriver‘ has no attribute ‘Chrome‘
- [Solved]AttributeError: module ‘urllib’ has no attribute ‘quote’
- [Solved] AttributeError: module ‘setuptools._distutils‘ has no attribute ‘version‘
- [Solved] AttributeError: module ‘logging‘ has no attribute ‘Handler‘
- [How to Solve]AttributeError: module ‘scipy’ has no attribute ‘stats’
- [Solved] AttributeError: module ‘PIL.Image‘ has no attribute ‘open‘
- How to Solve Python AttributeError: ‘module’ object has no attribute ‘xxx’
- BlazingSQL Error: AttributeError: module ‘cio‘ has no attribute ‘RunQueryError‘
- Python3.7 AttributeError: module ‘time‘ has no attribute ‘clock‘