class_docstr: A conditional 'radial' bijective transform context using the equation,
  
      :math:`\mathbf{y} = \mathbf{x} + \beta h(\alpha,r)(\mathbf{x} - \mathbf{x}_0)`
  
  where :math:`\mathbf{x}` are the inputs, :math:`\mathbf{y}` are the outputs,
  and :math:`\alpha\in\mathbb{R}^+`, :math:`\beta\in\mathbb{R}`,
  and :math:`\mathbf{x}_0\in\mathbb{R}^D`, are the output of a function, e.g. a NN,
  with input :math:`z\in\mathbb{R}^{M}` representing the context variable to
  condition on. The input dimension is :math:`D`,
  :math:`r=||\mathbf{x}-\mathbf{x}_0||_2`, and :math:`h(\alpha,r)=1/(\alpha+r)`.
  For this to be an invertible transformation, the condition :math:`\beta>-\alpha`
  is enforced.
  
  Example usage:
  
  >>> from pyro.nn.dense_nn import DenseNN
  >>> input_dim = 10
  >>> context_dim = 5
  >>> batch_size = 3
  >>> base_dist = dist.Normal(torch.zeros(input_dim), torch.ones(input_dim))
  >>> param_dims = [input_dim, 1, 1]
  >>> hypernet = DenseNN(context_dim, [50, 50], param_dims)
  >>> transform = ConditionalRadial(hypernet)
  >>> z = torch.rand(batch_size, context_dim)
  >>> flow_dist = dist.ConditionalTransformedDistribution(base_dist,
  ... [transform]).condition(z)
  >>> flow_dist.sample(sample_shape=torch.Size([batch_size])) # doctest: +SKIP
  
  The inverse of this transform does not possess an analytical solution and is
  left unimplemented. However, the inverse is cached when the forward operation is
  called during sampling, and so samples drawn using the radial transform can be
  scored.
  
  :param input_dim: the dimension of the input (and output) variable.
  :type input_dim: int
  
  References:
  
  [1] Danilo Jimenez Rezende, Shakir Mohamed. Variational Inference with
  Normalizing Flows. [arXiv:1505.05770]
code: def __init__(self, nn):
      super().__init__()
      self.nn = nn
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.distributions import Transform, constraints
  from pyro.nn import DenseNN
  from ..conditional import ConditionalTransformModule
  from ..torch_transform import TransformModule
  from ..util import copy_docs_from
label_desc: Use image node_id 1 to create a new ConditionalRadial object from inherited base classes: ConditionalTransformModule with example: obj = ConditionalRadial(nn)