python - 张量流概率错误: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 上运行相同的代码时,它运行良好。
解决方案
推荐阅读
- c++ - aarch64 g++:__asm 中的 MOV 仅移动 64 位值的低 32 位
- mongoose - 用于 MongoError 的 NestJS 异常过滤器返回 UnhandledPromiseRejectionWarning
- sql - 执行作业时 SQL 配置文件名称错误
- javascript - 创建 ReactJS 应用程序时出现错误消息
- python - 为什么我的多元 LSTM 不断预测零?
- node.js - 如何使用 sequelize(sqlite) 作为数据库在 nodejs(express) 中创建删除方法
- qt - QML中如何分离Repeater的设计和逻辑
- java - 尝试调用虚拟方法 'void androidx.appcompat.widget.ShareActionProvider.setShareIntent(android.content.Intent)
- python-2.7 - kafka-python:使用 0 vs inf secs 超时关闭 kafka 生产者
- python - 如何根据行而不是字符串替换特定数据?Python, 文件