class_docstr: Very simple multi-layer perceptron (also called FFN) with relu. Mostly
  used in DETR series detectors.
  
  Args:
      input_dim (int): Feature dim of the input tensor.
      hidden_dim (int): Feature dim of the hidden layer.
      output_dim (int): Feature dim of the output tensor.
      num_layers (int): Number of FFN layers. As the last
          layer of MLP only contains FFN (Linear).
class_docstr_tok: ["Very","simple","multi-layer","perceptron","(","also","called","FFN",")","with","relu",".","Mostly","used","in","DETR","series","detectors",".","Args",":","input_dim","(","int",")",":","Feature","dim","of","the","input","tensor",".","hidden_dim","(","int",")",":","Feature","dim","of","the","hidden","layer",".","output_dim","(","int",")",":","Feature","dim","of","the","output","tensor",".","num_layers","(","int",")",":","Number","of","FFN","layers",".","As","the","last","layer","of","MLP","only","contains","FFN","(","Linear",")","."]
code: def __init__(
      self,
      input_dim: int,
      hidden_dim: int,
      output_dim: int,
      num_layers: int,
  ) -> None:
      super().__init__()
      self.num_layers = num_layers
      h = [hidden_dim] * (num_layers - 1)
      self.layers = ModuleList(
          Linear(n, k)
          for n, k in zip([input_dim] + h, h + [output_dim])
      )
  
imports: import math
  import warnings
  from typing import Optional, Sequence, Tuple, Union
  import torch
  import torch.nn.functional
  from mmcv.cnn import Linear, build_activation_layer, build_conv_layer, build_norm_layer
  from mmcv.cnn.bricks.drop import Dropout
  from mmengine.model import BaseModule, ModuleList
  from mmengine.utils import to_2tuple
  from torch import Tensor, nn
  from mmdet.registry import MODELS
  from mmdet.utils import OptConfigType, OptMultiConfig
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: BaseModule with example: obj = MLP(input_dim, hidden_dim, output_dim, num_layers)