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,
  ):
      super().__init__()
  
      d_input = d_input or d_hidden
      d_static = d_static or 0
      if d_output is None:
          d_output = d_input
          self.add_skip = False
      else:
          if d_output != d_input:
              self.add_skip = True
              self.skip_proj = nn.Linear(
                  in_features=d_input, out_features=d_output
              )
          else:
              self.add_skip = False
  
      self.mlp = nn.Sequential(
          nn.Linear(
              in_features=d_input + d_static, out_features=d_hidden
          ),
          nn.ELU(),
          nn.Linear(in_features=d_hidden, out_features=d_hidden),
          nn.Dropout(p=dropout),
          nn.Linear(in_features=d_hidden, out_features=d_output * 2),
          GatedLinearUnit(nonlinear=False),
      )
  
      self.lnorm = nn.LayerNorm(d_output)
  
imports: from typing import List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  from pts.modules import FeatureEmbedder
label_desc: Use image node_id 1 to create a new GatedResidualNetwork object from inherited base classes: nn with example: obj = GatedResidualNetwork(d_hidden, d_input, d_output, d_static, dropout)