class_docstr: A bijection that reorders the input dimensions, that is, multiplies the input by
  a permutation matrix. This is useful in between
  :class:`~pyro.distributions.transforms.AffineAutoregressive` transforms to
  increase the flexibility of the resulting distribution and stabilize learning.
  Whilst not being an autoregressive transform, the log absolute determinate of
  the Jacobian is easily calculable as 0. Note that reordering the input dimension
  between two layers of
  :class:`~pyro.distributions.transforms.AffineAutoregressive` is not equivalent
  to reordering the dimension inside the MADE networks that those IAFs use; using
  a :class:`~pyro.distributions.transforms.Permute` transform results in a
  distribution with more flexibility.
  
  Example usage:
  
  >>> from pyro.nn import AutoRegressiveNN
  >>> from pyro.distributions.transforms import AffineAutoregressive, Permute
  >>> base_dist = dist.Normal(torch.zeros(10), torch.ones(10))
  >>> iaf1 = AffineAutoregressive(AutoRegressiveNN(10, [40]))
  >>> ff = Permute(torch.randperm(10, dtype=torch.long))
  >>> iaf2 = AffineAutoregressive(AutoRegressiveNN(10, [40]))
  >>> flow_dist = dist.TransformedDistribution(base_dist, [iaf1, ff, iaf2])
  >>> flow_dist.sample()  # doctest: +SKIP
  
  :param permutation: a permutation ordering that is applied to the inputs.
  :type permutation: torch.LongTensor
  :param dim: the tensor dimension to permute. This value must be negative and
      defines the event dim as `abs(dim)`.
  :type dim: int
code: def domain(self):
      return constraints.independent(constraints.real, -self.dim)
  
file_path: pyro/pyro/distributions/transforms/permute.py
imports: import torch
  from torch.distributions.transforms import Transform
  from torch.distributions.utils import lazy_property
  from pyro.distributions import constraints
  from ..util import copy_docs_from
label_desc: Use image node_id 2 for calling the Permute obj's underlying member method code with example usage: obj.domain() and returns: constraints