首页 > 解决方案 > 张量流概率错误:AttributeError:模块'tensorflow_probability'没有属性'distributions'

问题描述

我正在使用 Tensorflow Probability 网页上提供的小示例代码在我们的网格环境(在 redhat6.10 上运行)测试 tensorflow 概率。我能够导入 tensorflow_probability,但在执行下一个命令时遇到以下错误: features = tfp.distributions.Normal(loc=0., scale=1.).sample(int(100e3))

 AttributeError                            Traceback (most recent call last)
<ipython-input-3-6342260260f2> in <module>
----> 1 features = tfp.distributions.Normal(loc=0., scale=1.).sample(int(100e3))

AttributeError: module 'tensorflow_probability' has no attribute 'distributions'

有人有想法吗?这次我在窗口 PC 上运行相同的代码时,它运行良好。

标签: pythontensorflowredhattensorflow-probability

解决方案


推荐阅读