class_docstr: Class that takes a partially input convex neural network (picnn)
  as input and equips it with functions of logdet
  computation (both estimation and exact computation)
  This class is based on DeepConvexFlow of the CP-Flow
  repo (https://github.com/CW-Huang/CP-Flow)
  For details of the logdet estimator, see
  ``Convex potential flows: Universal probability distributions
  with optimal transport and convex optimization``
  Parameters
  ----------
  picnn
      A partially input convex neural network (picnn)
  dim
      Dimension of the input
  is_energy_score
      Indicates if energy score is used as the objective function
      If yes, the network is not required to be strictly convex,
      so we can just use the picnn
      otherwise, a quadratic term is added to the output of picnn
      to render it strictly convex
  m1
      Dimension of the Krylov subspace of the Lanczos tridiagonalization
      used in approximating H of logdet(H)
  m2
      Iteration number of the conjugate gradient algorithm
      used to approximate logdet(H)
  rtol
      relative tolerance of the conjugate gradient algorithm
  atol
      absolute tolerance of the conjugate gradient algorithm
code: def forward_transform(
      self,
      x: torch.Tensor,
      logdet: Optional[torch.Tensor] = 0,
      context: Optional[torch.Tensor] = None,
      extra: Optional[torch.Tensor] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      if self.estimate_logdet:
          return self.forward_transform_stochastic(
              x, logdet, context=context, extra=extra
          )
      else:
          return self.forward_transform_bruteforce(
              x, logdet, context=context
          )
  
imports: from typing import List, Optional, Tuple
  from cpflows.flows import DeepConvexFlow, SequentialFlow
  import torch
  from torch.distributions import AffineTransform, Distribution, Normal, TransformedDistribution
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the DeepConvexNet obj's underlying member method code with example usage: obj.forward_transform(x, logdet, context, extra) and returns: self, self