VariationalChain¶
-
class
tfsnippet.
VariationalChain
(variational, model, log_joint=None, latent_names=None, latent_axis=None)¶ Bases:
object
Chain of the variational and model nets for variational inference.
In the context of variational inference, it is a common usage for chaining the variational net and the model net, by feeding the samples of latent variables from the variational net as the observations of the model net.
VariationalChain
holds theBayesianNet
instances of the variational and the model nets, and theVariationalInference
object for this chain.See also
tfsnippet.bayes.BayesianNet.variational_chain()
Attributes Summary
latent_axis
Get the axes of sampling dimensions of latent variables. latent_names
Get the names of the latent variables for variational inference. log_joint
Get the log-joint of the model. model
Get the model net. variational
Get the variational net. vi
Get the variational inference object. Attributes Documentation
-
latent_axis
¶ Get the axes of sampling dimensions of latent variables.
-
latent_names
¶ Get the names of the latent variables for variational inference.
Returns: The names of the latent variables. Return type: tuple[str]
-
log_joint
¶ Get the log-joint of the model.
Returns: The log-joint of the model. Return type: tf.Tensor
-
model
¶ Get the model net.
Returns: The model net. Return type: BayesianNet
-
variational
¶ Get the variational net.
Returns: The variational net. Return type: BayesianNet
-
vi
¶ Get the variational inference object.
Returns: The variational inference object. Return type: VariationalInference
-