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: Forward transformation of iResnet.
  
  Parameters
  ----------
  x
      observations
  
  Returns
  -------
  Tensor
      transformed tensor `        ext{iResnet}(x)`
docstr_tok: ["Forward","transformation","of","iResnet",".","Parameters","--","--","--","--","--","x","observations","Returns","--","--","--","-","Tensor","transformed","tensor","`","ext","{","iResnet","}","(","x",")","`"]
code: def f(self, x: Tensor) -> Tensor:
      """
      Forward transformation of iResnet.
  
      Parameters
      ----------
      x
          observations
  
      Returns
      -------
      Tensor
          transformed tensor `\text{iResnet}(x)`
      """
      if x is self._cached_x:
          return self._cached_y
      y = x
      for _ in range(self._num_inv_iters):
          y = x - self._block(y)
      if self._use_caching:
          self._cached_x = x
          self._cached_y = y
      return y
  
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 4 for calling the InvertibleResnetHybridBlock obj's underlying member method code with example usage: obj.f(x) and returns: y, self