class_docstr: An expert using 2 FMoELinear modules to speed up the computation of experts
  within one worker.
class_docstr_tok: ["An","expert","using","2","FMoELinear","modules","to","speed","up","the","computation","of","experts","within","one","worker","."]
docstr: First expand input to 4h (the hidden size is variable, but is called h4
  for convenience). Then perform activation. Finally shirink back to h.
docstr_tok: ["First","expand","input","to","4h","(","the","hidden","size","is","variable",",","but","is","called","h4","for","convenience",")",".","Then","perform","activation",".","Finally","shirink","back","to","h","."]
code: def forward(self, inp, fwd_expert_count):
      r"""
      First expand input to 4h (the hidden size is variable, but is called h4
      for convenience). Then perform activation. Finally shirink back to h.
      """
      x = self.htoh4(inp, fwd_expert_count)
      x = self.activation(x)
      x = self.h4toh(x, fwd_expert_count)
      return x
  
file_path: smart-moe/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 _Expert obj's underlying member method code with example usage: obj.forward(inp, fwd_expert_count) and returns: x