【发布时间】:2018-06-22 12:57:27
【问题描述】:
我想使用 tensorflow 评估多元正态分布的 cdf。到目前为止我尝试过的:
import tensorflow as tf
ds = tf.contrib.distributions
# Initialize a single 3-variate Gaussian.
mu = [0., 0., 0.]
cov = [[ 0.36, 0.12, 0.06],
[ 0.12, 0.29, -0.13],
[ 0.06, -0.13, 0.26]]
mvn = ds.MultivariateNormalFullCovariance(
loc=mu,
covariance_matrix=cov)
value = tf.constant([0., 0., 0.])
with tf.Session() as sess:
print mvn.cdf(value).eval()
这会产生错误:
NotImplementedError: cdf is not implemented when overriding event_shape
我不明白为什么要覆盖 event_shape,因为 event_shape 和 value 的形状是相同的。我做错了什么?
【问题讨论】:
标签: python tensorflow cdf