class_docstr: A complete MoE MLP module in a Transformer block.
  * `activation` is the activation function to be used in MLP in each expert.
  * `d_hidden` is the dimension of the MLP layer.
class_docstr_tok: ["A","complete","MoE","MLP","module","in","a","Transformer","block",".","*","`","activation","`","is","the","activation","function","to","be","used","in","MLP","in","each","expert",".","*","`","d_hidden","`","is","the","dimension","of","the","MLP","layer","."]
docstr: This module wraps up the FMoE module with reshape, residual and layer
  normalization.
docstr_tok: ["This","module","wraps","up","the","FMoE","module","with","reshape",",","residual","and","layer","normalization","."]
code: def forward(self, inp: torch.Tensor):
      r"""
      This module wraps up the FMoE module with reshape, residual and layer
      normalization.
      """
      original_shape = inp.shape
      inp = inp.reshape(-1, self.d_model)
      output = super().forward(inp)
      return output.reshape(original_shape)
  
file_path: fastmoe/fmoe/transformer.py
imports: import torch
  import torch.nn
  from .layers import FMoE
  from .linear import FMoELinear
  from .fastermoe.config import switch_from_env
label_desc: Use image node_id 2 for calling the FMoETransformerMLP obj's underlying member method code with example usage: obj.forward(inp) and returns: output