我正试图让 Uber 的 Ludwig 运行。我收到关于没有属性“random_normal”的错误。我可以使用这些命令在 Python 中重现错误。
>>> import tensorflow as tf
>>> tf.reduce_sum(tf.random_normal([1000,1000]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'random_normal'
>>> print(tf.__version__)
2.1.0
>>> print(sys.version)
3.7.5 (defaut, Oct 25 2019, 15:51:11)
[GCC 7.3.0]
将不胜感激帮助重新如何克服这个错误。
原文由 Sol 发布,翻译遵循 CC BY-SA 4.0 许可协议
它被移动到
tf.random.normal
(连同所有其他tf.random_*
功能)