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 __init__(
      self,
      picnn: torch.nn.Module,
      dim: int,
      is_energy_score: bool = False,
      estimate_logdet: bool = False,
      m1: int = 10,
      m2: Optional[int] = None,
      rtol: float = 0.0,
      atol: float = 1e-3,
  ) -> None:
      super().__init__(
          picnn,
          dim,
          m1=m1,
          m2=m2,
          rtol=rtol,
          atol=atol,
      )
  
      self.picnn = self.icnn
      self.is_energy_score = is_energy_score
      self.estimate_logdet = estimate_logdet
  
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 1 to create a new DeepConvexNet object from inherited base classes: DeepConvexFlow with example: obj = DeepConvexNet(picnn, dim, is_energy_score, estimate_logdet, m1, m2, rtol, atol)