class_docstr: An implementation of Renyi's :math:`\alpha`-divergence variational inference
  following reference [1].
  
  In order for the objective to be a strict lower bound, we require
  :math:`\alpha \ge 0`. Note, however, that according to reference [1], depending
  on the dataset :math:`\alpha < 0` might give better results. In the special case
  :math:`\alpha = 0`, the objective function is that of the important weighted
  autoencoder derived in reference [2].
  
  .. note:: Setting :math:`\alpha < 1` gives a better bound than the usual ELBO.
      For :math:`\alpha = 1`, it is better to use
      :class:`~pyro.infer.trace_elbo.Trace_ELBO` class because it helps reduce
      variances of gradient estimations.
  
  :param float alpha: The order of :math:`\alpha`-divergence. Here
      :math:`\alpha \neq 1`. Default is 0.
  :param num_particles: The number of particles/samples used to form the objective
      (gradient) estimator. Default is 2.
  :param int max_plate_nesting: Bound on max number of nested
      :func:`pyro.plate` contexts. Default is infinity.
  :param bool strict_enumeration_warning: Whether to warn about possible
      misuse of enumeration, i.e. that
      :class:`~pyro.infer.traceenum_elbo.TraceEnum_ELBO` is used iff there
      are enumerated sample sites.
  
  References:
  
  [1] `Renyi Divergence Variational Inference`,
      Yingzhen Li, Richard E. Turner
  
  [2] `Importance Weighted Autoencoders`,
      Yuri Burda, Roger Grosse, Ruslan Salakhutdinov
docstr: Returns a single trace from the guide, and the model that is run
  against it.
docstr_tok: ["Returns","a","single","trace","from","the","guide",",","and","the","model","that","is","run","against","it","."]
code: def _get_trace(self, model, guide, args, kwargs):
      """
      Returns a single trace from the guide, and the model that is run
      against it.
      """
      model_trace, guide_trace = get_importance_trace(
          "flat", self.max_plate_nesting, model, guide, args, kwargs
      )
      if is_validation_enabled():
          check_if_enumerated(guide_trace)
      return model_trace, guide_trace
  
file_path: pyro/pyro/infer/renyi_elbo.py
imports: import math
  import warnings
  import torch
  from pyro.distributions.util import is_identically_zero
  from pyro.infer.elbo import ELBO
  from pyro.infer.enum import get_importance_trace
  from pyro.infer.util import get_dependent_plate_dims, is_validation_enabled, torch_sum
  from pyro.util import check_if_enumerated, warn_if_nan
label_desc: Use image node_id 2 for calling the RenyiELBO obj's underlying member method code with example usage: obj._get_trace(model, guide, args, kwargs) and returns: model_trace,  guide_trace