zhusuan.variational.elbo

class ELBO(generator, variational)[source]

Bases: jittor.Module

Short cut for class EvidenceLowerBoundObjective

execute(observed, reduce_mean=True)[source]
log_joint(nodes)[source]

The default log joint probability function. It works by summing over all the conditional log probabilities of stochastic nodes evaluated at their current values (samples or observations).

Returns

A Var.

class EvidenceLowerBoundObjective(generator, variational)[source]

Bases: zhusuan.variational.elbo.ELBO

The class that represents the evidence lower bound (ELBO) objective for variational inference. It can be constructed like a Jittor’s Module by passing 2 BayesianNet instances. For example, the generator network and the variational inference network in VAE. The model can calculate the ELBO’s value with observations passed.

See also

For more details and examples, please refer to Variational Autoencoders and Bayesian Neural Networks

Parameters
  • generator – A BayesianNet instance that typically defines the learning process.

  • variational – A BayesianNet instance that defines the variational family.