code: def __init__(
      self,
      d_hidden: int,
      d_input: Optional[int] = None,
      d_output: Optional[int] = None,
      d_static: Optional[int] = None,
      dropout: float = 0.0,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.d_hidden = d_hidden
      self.d_input = d_input or d_hidden
      self.d_static = d_static or 0
      if d_output is None:
          self.d_output = self.d_input
          self.add_skip = False
      else:
          self.d_output = d_output
          if d_output != self.d_input:
              self.add_skip = True
              with self.name_scope():
                  self.skip_proj = nn.Dense(
                      units=self.d_output,
                      in_units=self.d_input,
                      flatten=False,
                      weight_initializer=init.Xavier(),
                  )
          else:
              self.add_skip = False
  
      with self.name_scope():
          self.mlp = nn.HybridSequential(prefix="mlp_")
          self.mlp.add(
              nn.Dense(
                  units=self.d_hidden,
                  in_units=self.d_input + self.d_static,
                  flatten=False,
                  weight_initializer=init.Xavier(),
              )
          )
          self.mlp.add(nn.ELU())
          self.mlp.add(
              nn.Dense(
                  units=self.d_hidden,
                  in_units=self.d_hidden,
                  flatten=False,
                  weight_initializer=init.Xavier(),
              )
          )
          self.mlp.add(nn.Dropout(dropout)),
          self.mlp.add(
              nn.Dense(
                  units=self.d_output * 2,
                  in_units=self.d_hidden,
                  flatten=False,
                  weight_initializer=init.Xavier(),
              )
          )
          self.mlp.add(
              GatedLinearUnit(
                  axis=-1,
                  nonlinear=False,
              )
          )
          self.lnorm = nn.LayerNorm(axis=-1, in_channels=self.d_output)
  
imports: import math
  from typing import List, Optional, Tuple
  from mxnet import init
  from mxnet.gluon import HybridBlock, nn, rnn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
label_desc: Use image node_id 1 to create a new GatedResidualNetwork object from inherited base classes: HybridBlock with example: obj = GatedResidualNetwork(d_hidden, d_input, d_output, d_static, dropout)