def sgvb(self):
"""
Implements the stochastic gradient variational bayes (SGVB) gradient
estimator for the objective, also known as "reparameterization trick"
or "path derivative estimator". It was first used for importance
weighted objectives in (Burda, 2015), where it's named "IWAE".
It only works for latent `StochasticTensor` s that can be
reparameterized (Kingma, 2013). For example,
:class:`~zhusuan.model.stochastic.Normal`
and :class:`~zhusuan.model.stochastic.Concrete`.
.. note::
To use the :meth:`sgvb` estimator, the ``is_reparameterized``
property of each latent `StochasticTensor` must be True (which is
the default setting when they are constructed).
:return: A Tensor. The surrogate cost for Tensorflow optimizers to
minimize.
"""
return -self.tensor
评论列表
文章目录