class_docstr: Base mixing for MoE modules. The interface represented by this module is:
  
  expert_assignments = gate(hidden_states)
  intermediate = ragged_linear(hidden_states, expert_assignments)
  output = ragged_linear(intermediate, expert_assignments)
class_docstr_tok: ["Base","mixing","for","MoE","modules",".","The","interface","represented","by","this","module","is",":","expert_assignments","=","gate","(","hidden_states",")","intermediate","=","ragged_linear","(","hidden_states",",","expert_assignments",")","output","=","ragged_linear","(","intermediate",",","expert_assignments",")"]
docstr: Perform any necessary transformations of the gate parameter.
  
  Args:
      param (torch.Tensor): gate_w (shape: [num_experts, model_dim])
docstr_tok: ["Perform","any","necessary","transformations","of","the","gate","parameter",".","Args",":","param","(","torch.Tensor",")",":","gate_w","(","shape",":","[","num_experts",",","model_dim","]",")"]
code: def transform_gate_param(
      self, param: torch.Tensor
  ) -> InferenceParameter:
      """
      Perform any necessary transformations of the gate parameter.
  
      Args:
          param (torch.Tensor): gate_w (shape: [num_experts, model_dim])
      """
      ...
  
imports: from abc import abstractmethod
  from typing import Any, Dict, Optional, Type
  import torch
  from deepspeed.runtime.config_utils import DeepSpeedConfigModel
  from ..ds_module import DSModuleBase
  from ..module_registry import DSModuleRegistryBase
  from ..configs import DSMoEConfig
  from ...inference_parameter import InferenceParameter
label_desc: Use image node_id 3 for calling the DSMoEBase obj's underlying member method code with example usage: obj.transform_gate_param(param) without return types