在Matlab中,我可以用
x = [0.8147,0.9058,0.1270,0.9134,0.6324,0.0975,0.2785,0.5469,0.9575,0.9649]
y = normpdf(x,1.0,2.5)
输出:
^{pr2}$使用tensorflow,我已经试过了
x = tf.variable([0.8147,0.9058,0.1270,0.9134,0.6324,0.0975,0.2785,0.5469,0.9575,0.9649],tf.float32)
y = tf.contrib.distributions.NormalWithSoftplusSigma.pdf(x)
我得到一个错误TypeError: pdf missing 1 required positional argument
如何将mu和sigma值输入到这个分布中?得到相似的输出。在
首先创建一个
Normal distributions
对象,然后使用pdf
方法有关详细信息,请参见this。在
此函数
pdf
更新为prob
:相关问题 更多 >
编程相关推荐