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):
      super().__init__()
      self.htoh4 = FMoELinear(
          num_expert, d_model, d_hidden, bias=True, rank=rank
      )
      self.h4toh = FMoELinear(
          num_expert, d_hidden, d_model, bias=True, rank=rank
      )
      self.activation = activation
  
imports: import sys
  import pytest
  import torch
  import torch.nn
  import numpy
  from fmoe.gates import NaiveGate
  from fmoe.layers import FMoE
  from fmoe.linear import FMoELinear
  from fmoe.megatron.layers import _megatron_init_method
label_desc: Use image node_id 1 to create a new MyExpert object from inherited base classes: nn with example: obj = MyExpert(num_expert, d_model, d_hidden, activation, rank)