我定期导入TensorFlow概率,这是我的两层:
tfp.layers.DenseFlipout(512, activation=tf.nn.relu),
tfp.layers.DenseFlipout(10),
但是,当我运行此消息时,我一直收到此消息:
文件“ dark.py”,第10行,在
import tensorflow_probability as tfp
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\__init__.py", line 75, in <module>
from tensorflow_probability.python import * # pylint: disable=wildcard-import
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\python\__init__.py", line 21, in <module>
from tensorflow_probability.python import bijectors
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\python\bijectors\__init__.py", line 23, in <module>
from tensorflow_probability.python.bijectors.absolute_value import AbsoluteValue
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\python\bijectors\absolute_value.py", line 23, in <module>
from tensorflow_probability.python.bijectors import bijector
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\python\bijectors\bijector.py", line 213, in <module>
class Bijector(tf.Module):
File "C:\Python\Python37\lib\site-packages\tensorflow_probability\python\bijectors\bijector.py", line 570, in Bijector
_TF_MODULE_IGNORED_PROPERTIES = tf.Module._TF_MODULE_IGNORED_PROPERTIES.union(
AttributeError: type object 'Module' has no attribute '_TF_MODULE_IGNORED_PROPERTIES'
有什么办法解决这个问题?我已经上网搜索了,但是什么也没找到。
答案 0 :(得分:0)
没关系(这是我的另一个帐户),如果您遇到相同的问题,请键入
pip list
并每晚检查一下是否有tf,如果有,则需要输入此命令
pip install tf.nightly-2.0-preview
应该可以。