contrib.bayesflow.variational_inference.elbo_with_log_joint

tf.contrib.bayesflow.variational_inference.elbo_with_log_joint

tf.contrib.bayesflow.variational_inference.elbo_with_log_joint

elbo_with_log_joint(
    log_joint,
    variational=None,
    keep_batch_dim=True,
    form=None,
    name='ELBO'
)

Defined in tensorflow/contrib/bayesflow/python/ops/variational_inference_impl.py.

See the guide: BayesFlow Variational Inference (contrib) > Ops

Evidence Lower BOund. log p(x) >= ELBO.

This method is for models that have computed p(x,Z) instead of p(x|Z). See elbo for further details.

Because only the joint is specified, analytic KL is not available.

Args:

  • log_joint: Tensor log p(x, Z).
  • variational: list of StochasticTensor q(Z). If None, defaults to all StochasticTensor objects upstream of log_joint.
  • keep_batch_dim: bool. Whether to keep the batch dimension when summing entropy term. When the sample is per data point, this should be True; otherwise (e.g. in a Bayesian NN), this should be False.
  • form: ELBOForms constant. Controls how the ELBO is computed. Defaults to ELBOForms.default.
  • name: name to prefix ops with.

Returns:

Tensor ELBO of the same type and shape as log_joint.

Raises:

  • TypeError: if variationals in variational are not StochasticTensors.
  • TypeError: if form is not a valid ELBOForms constant.
  • ValueError: if variational is None and there are no StochasticTensors upstream of log_joint.
  • ValueError: if form is ELBOForms.analytic_kl.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/bayesflow/variational_inference/elbo_with_log_joint

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部