问题描述
作为我使用keras(tensorflow后端)构建的模型的一个步骤,我想将标量通过标准正态分布的CDF。但是,当我测试以下几行代码时:
import tensorflow_probability as tfp
tfd = tfp.distributions
# Define a single scalar normal distribution.
dist = tfd.normal(loc=0.,scale=3.)
# Evaluate the cdf at 1,returning a scalar.
print(dist.cdf(1.))
我得到的是看起来像一个空张量的东西:
Tensor("normal_5/cdf/ndtr/mul_1:0",shape=(),dtype=float32)
有人知道我在做什么错吗?我正使用官方Pandas Dataframe文档的示例。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)