class_docstr: Loss function of VAE.
  
  The loss value is equal to ELBO (Evidence Lower Bound)
  multiplied by -1.
  
  Args:
      encoder (chainer.Chain): A neural network which outputs variational
          posterior distribution q(z|x) of a latent variable z given
          an observed variable x.
      decoder (chainer.Chain): A neural network which outputs conditional
          distribution p(x|z) of the observed variable x given
          the latent variable z.
      prior (chainer.Chain): A prior distribution over the latent variable z.
      beta (float): Usually this is 1.0. Can be changed to control the
          second term of ELBO bound, which works as regularization.
      k (int): Number of Monte Carlo samples used in encoded vector.
code: def __call__(self, x):
      q_z = self.encoder(x)
      z = q_z.sample(self.k)
      p_x = self.decoder(z)
      p_z = self.prior()
  
      reconstr = F.mean(
          p_x.log_prob(F.broadcast_to(x[None, :], (self.k,) + x.shape))
      )
      kl_penalty = F.mean(chainer.kl_divergence(q_z, p_z))
      loss = -(reconstr - self.beta * kl_penalty)
      reporter.report({"loss": loss}, self)
      reporter.report({"reconstr": reconstr}, self)
      reporter.report({"kl_penalty": kl_penalty}, self)
      return loss
  
imports: import numpy
  import chainer
  import chainer.distributions
  import chainer.functions
  import chainer.links
  from chainer import reporter
label_desc: Use image node_id 2 for calling the AvgELBOLoss obj's underlying member method code with example usage: obj.__call__(x) and returns: loss