简体   繁体   中英

Trying to understand tensorflow bayesflow monte carlo

I apologize for the nature of this question but I'm relatively new to tensorflow.

I am having trouble understanding the bayesflow monte carlo operations of tensorflow, as described here

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 . 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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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