code: def __init__(
      self,
      input_dim: int,
      hidden_dim: int,
      output_dim: int,
      num_layers: int,
      sigmoid_output: bool = False,
  ) -> None:
      super().__init__()
      self.num_layers = num_layers
      h = [hidden_dim] * (num_layers - 1)
      self.layers = nn.ModuleList(
          nn.Linear(n, k)
          for n, k in zip([input_dim] + h, h + [output_dim])
      )
      self.sigmoid_output = sigmoid_output
  
file_path: segment-anything/segment_anything/modeling/mask_decoder.py
imports: import torch
  from torch import nn
  from torch.nn import functional
  from typing import List, Tuple, Type
  from .common import LayerNorm2d
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: nn with example: obj = MLP(input_dim, hidden_dim, output_dim, num_layers, sigmoid_output)