class_docstr: Generic decentering reparameterizer [1] for latent variables parameterized
  by ``loc`` and ``scale`` (and possibly additional ``shape_params``).
  
  This reparameterization works only for latent variables, not likelihoods.
  
  [1] Maria I. Gorinova, Dave Moore, Matthew D. Hoffman (2019)
      "Automatic Reparameterisation of Probabilistic Programs"
      https://arxiv.org/pdf/1906.03028.pdf
  
  :param float centered: optional centered parameter. If None (default) learn
      a per-site per-element centering parameter in ``[0,1]``. If 0, fully
      decenter the distribution; if 1, preserve the centered distribution
      unchanged.
  :param shape_params: Optional list of additional parameter names to copy
      unchanged from the centered to decentered distribution. If absent,
      all params in a distributions ``.arg_constraints`` will be copied.
  :type shape_params: tuple or list
code: def __init__(self, centered=None, shape_params=None):
      assert centered is None or isinstance(
          centered, (float, torch.Tensor)
      )
      if shape_params is not None:
          assert isinstance(shape_params, (tuple, list))
          assert all(isinstance(name, str) for name in shape_params)
      if is_validation_enabled():
          if isinstance(centered, float):
              assert 0 <= centered and centered <= 1
          elif isinstance(centered, torch.Tensor):
              assert (0 <= centered).all()
              assert (centered <= 1).all()
          else:
              assert centered is None
      self.centered = centered
      self.shape_params = shape_params
  
file_path: pyro/pyro/infer/reparam/loc_scale.py
imports: import torch
  from torch.distributions import constraints
  import pyro
  import pyro.distributions
  from pyro.distributions.util import is_identically_one, is_validation_enabled
  from .reparam import Reparam
label_desc: Use image node_id 1 to create a new LocScaleReparam object from inherited base classes: Reparam with example: obj = LocScaleReparam(centered, shape_params)