class_docstr: Multi-layer perception module.
class_docstr_tok: ["Multi-layer","perception","module","."]
code: def __init__(
      self,
      in_features,
      hidden_features=None,
      out_features=None,
      act_layer=GELU,
      drop_rate=0.0,
  ):
      super().__init__()
      self.drop_rate = drop_rate
      out_features = out_features or in_features
      hidden_features = hidden_features or in_features
      self.fc1 = Linear(
          in_features, hidden_features
      )  # pylint: disable=too-many-function-args
      self.act = act_layer()
      self.fc2 = Linear(
          hidden_features, out_features
      )  # pylint: disable=too-many-function-args
      if self.drop_rate > 0.0:
          self.drop = Dropout(drop_rate)
  
imports: import math
  from functools import partial
  from typing import Tuple, List
  import numpy
  import torch
  from torch import nn
  from torch.nn.init import trunc_normal_
  from einops import rearrange
  from towhee.models.layers.layers_with_relprop import GELU, Linear, Dropout, Conv2d, Conv3d, Softmax, Sigmoid, LayerNorm, Einsum, Add, Clone, MaxPool3d, IndexSelect
label_desc: Use image node_id 1 to create a new Mlp object from inherited base classes: nn with example: obj = Mlp(in_features, hidden_features, out_features, act_layer, drop_rate)