class_docstr: Based on [BJC19]_, apart from f and f_inv that are swapped.
class_docstr_tok: ["Based","on","[","BJC19","]","_",",","apart","from","f","and","f_inv","that","are","swapped","."]
docstr: Logarithm of the absolute value of the Jacobian determinant
  corresponding to the iResnet Transform.
  
  Parameters
  ----------
  x
      input of the forward transformation or output of the inverse
      transform
  y
      output of the forward transform or input of the inverse transform
  
  Returns
  -------
  Tensor
      Jacobian evaluated for x as input or y as output
docstr_tok: ["Logarithm","of","the","absolute","value","of","the","Jacobian","determinant","corresponding","to","the","iResnet","Transform",".","Parameters","--","--","--","--","--","x","input","of","the","forward","transformation","or","output","of","the","inverse","transform","y","output","of","the","forward","transform","or","input","of","the","inverse","transform","Returns","--","--","--","-","Tensor","Jacobian","evaluated","for","x","as","input","or","y","as","output"]
code: def log_abs_det_jac(self, x: Tensor, y: Tensor) -> Tensor:
      """
      Logarithm of the absolute value of the Jacobian determinant
      corresponding to the iResnet Transform.
  
      Parameters
      ----------
      x
          input of the forward transformation or output of the inverse
          transform
      y
          output of the forward transform or input of the inverse transform
  
      Returns
      -------
      Tensor
          Jacobian evaluated for x as input or y as output
      """
      if self._ignore_logdet:
          assert x is not None
          ladj = mx.nd.zeros(x.shape[0])
      else:
          # we take the negative value since we use the forward pass of mlp
          # to compute the inverse, and we want ladj of forward, which is
          # opposite of ladj of reverse
          jac_block = self._block.jacobian(y)
          batch_shape, (output_dim, input_dim) = (
              jac_block.shape[:-2],
              jac_block.shape[-2:],
          )
          identity = _broadcast_param(
              mx.nd.eye(output_dim, input_dim),
              axes=range(len(batch_shape)),
              sizes=batch_shape,
          )
          ladj = -log_abs_det(identity + jac_block)
  
      return ladj
  
file_path: gluonts/src/gluonts/mx/distribution/iresnet.py
imports: import mxnet
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.util import _broadcast_param
  from gluonts.mx.block.snmlp import SNMLPBlock
  from gluonts.mx.distribution.distribution import getF
  from gluonts.mx.distribution.bijection import BijectionHybridBlock, ComposedBijectionHybridBlock
label_desc: Use image node_id 6 for calling the InvertibleResnetHybridBlock obj's underlying member method code with example usage: obj.log_abs_det_jac(x, y) and returns: ladj