简体   繁体   English

试图了解Tensorflow Bayesflow Monte Carlo

[英]Trying to understand tensorflow bayesflow monte carlo

I apologize for the nature of this question but I'm relatively new to tensorflow. 对于这个问题的性质,我深表歉意,但是对于tensorflow我还是比较陌生。

I am having trouble understanding the bayesflow monte carlo operations of tensorflow, as described here 我无法理解tensorflow的bayesflow蒙特卡洛操作,描述在这里

As far as I know, it is an op for estimating the expected outcome of a function(?). 据我所知,这是估计函数预期结果的一种方法。

Additionally, how would I use it? 此外,我将如何使用它?

The BayesFlow Monte Carlo you are referring to is used to compute the the Monte Carlo approximization of E_p(f(Z)) , which is the expected value of a function of a random variable Z . 您所引用的BayesFlow蒙特卡洛用于计算E_p(f(Z))蒙特卡洛近似值,它是随机变量Z的函数的期望值。 The important part you seem to miss is that Z is a RV and that its distribution is not fully known (parameterized distr.), therefore you need to estimate. 您似乎想念的重要部分是Z是RV,并且其分布尚不完全清楚(参数化分布),因此需要估算。

You can use it like this: 您可以像这样使用它:

tf.contrib.bayesflow.monte_carlo.expectation(
    f,
    samples,
    log_prob=None,
    use_reparametrization=True,
    axis=0,
    keep_dims=False,
    name=None
)

and for additional infos about the parameters check this . 有关参数的其他信息,请检查this

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM