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","."]
code: def __init__(
      self, num_expert, d_model, d_hidden, activation, rank=0, bias=True
  ):
      super().__init__()
      self.htoh4 = FMoELinear(
          num_expert, d_model, d_hidden, bias=bias, rank=rank
      )
      self.h4toh = FMoELinear(
          num_expert, d_hidden, d_model, bias=bias, rank=rank
      )
      self.activation = activation
  
file_path: thu-pacman-faster-moe/fmoe/transformer.py
imports: import torch
  import torch.nn
  from .gates import NaiveGate
  from .layers import FMoE, FMoELinear
label_desc: Use image node_id 1 to create a new _Expert object from inherited base classes: nn with example: obj = _Expert(num_expert, d_model, d_hidden, activation, rank, bias)