code: def __init__(
      self,
      in_units: int,
      hidden_units: int,
      out_units: int,
      num_hidden_layers: int = 2,
      activation: str = "lipswish",
      jacobian_method: str = "bf",
      num_power_iter: int = 1,
      coeff: float = 0.9,
      flatten: bool = False,
  ):
      super().__init__()
      self._in_units = in_units
      self._hidden_units = hidden_units
      self._out_units = out_units
      self._num_hidden_layers = num_hidden_layers
      self._activation = activation
      self._jacobian_method = jacobian_method
      self._num_power_iter = num_power_iter
      self._coeff = coeff
      self._weight_initializer = mx.init.Orthogonal(scale=self._coeff)
      self._bias_initializer = "zeros"
      self._flatten = flatten
      self._cached_inputs: List[Tensor] = []
  
      in_dim = self._in_units
      with self.name_scope():
          self._layers: List[mx.gluon.HybridBlock] = []
          for i in range(self._num_hidden_layers):
              lin = SNDense(
                  self._hidden_units,
                  in_units=in_dim,
                  activation=None,
                  num_power_iter=self._num_power_iter,
                  weight_initializer=self._weight_initializer,
                  bias_initializer=self._bias_initializer,
                  coeff=self._coeff,
                  flatten=self._flatten,
              )
              act = get_activation(
                  self._activation, prefix=self._activation + str(i)
              )
              in_dim = self._hidden_units
              self.register_child(lin)
              self.register_child(act)
              self._layers += [lin, act]
  
          last_lin = SNDense(
              self._out_units,
              in_units=in_dim,
              activation=None,
              num_power_iter=self._num_power_iter,
              weight_initializer=self._weight_initializer,
              bias_initializer=self._bias_initializer,
              coeff=self._coeff,
              flatten=self._flatten,
          )
          self.register_child(last_lin)
          self._layers += [last_lin]
  
file_path: gluonts/src/gluonts/mx/block/snmlp.py
imports: from typing import List, Tuple
  import warnings
  import mxnet
  from mxnet.ndarray import linalg_gemm2
  from gluonts.mx import Tensor
  from gluonts.core.component import validated
  from gluonts.mx.util import _broadcast_param
  from gluonts.mx.activation import get_activation, get_activation_deriv
  from gluonts.mx.block.sndense import SNDense
label_desc: Use image node_id 1 to create a new SNMLPBlock object from inherited base classes: mx.gluon with example: obj = SNMLPBlock(in_units, hidden_units, out_units, num_hidden_layers, activation, jacobian_method, num_power_iter, coeff, flatten)