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","."]
code: def __init__(
      self,
      event_shape,
      hidden_units: int = 16,
      num_hidden_layers: int = 1,
      num_inv_iters: int = 10,
      ignore_logdet: bool = False,
      activation: str = "lipswish",
      num_power_iter: int = 1,
      flatten: bool = False,
      coeff: float = 0.9,
      use_caching: bool = True,
      *args,
      **kwargs,
  ):
      super().__init__(*args, **kwargs)
      assert len(event_shape) == 1
      self._event_shape = event_shape
      self._hidden_units = hidden_units
      self._num_hidden_layers = num_hidden_layers
      self._num_inv_iters = num_inv_iters
      self._ignore_logdet = ignore_logdet
      self._activation = activation
      self._coeff = coeff
      self._num_power_iter = num_power_iter
      self._flatten = flatten
      self._use_caching = use_caching
      self._cached_x = None
      self._cached_y = None
  
      with self.name_scope():
          self._block = SNMLPBlock(
              self._event_shape[0],
              self._hidden_units,
              self._event_shape[0],
              num_hidden_layers=self._num_hidden_layers,
              activation=self._activation,
              flatten=self._flatten,
          )
  
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 1 to create a new InvertibleResnetHybridBlock object from inherited base classes: BijectionHybridBlock with example: obj = InvertibleResnetHybridBlock(event_shape, hidden_units, num_hidden_layers, num_inv_iters, ignore_logdet, activation, num_power_iter, flatten, coeff, use_caching)