class_docstr: Pooler layer.
  
  Pool hidden states of a specific token (for example start of the
  sequence) and add a linear transformation followed by a tanh.
  
  Arguments:
      hidden_size: hidden size
      init_method: weight initialization method for the linear layer.
          bias is set to zero.
class_docstr_tok: ["Pooler","layer",".","Pool","hidden","states","of","a","specific","token","(","for","example","start","of","the","sequence",")","and","add","a","linear","transformation","followed","by","a","tanh",".","Arguments",":","hidden_size",":","hidden","size","init_method",":","weight","initialization","method","for","the","linear","layer",".","bias","is","set","to","zero","."]
code: def __init__(self, hidden_size, init_method):
      super(Pooler, self).__init__()
      args = get_args()
      self.dense = get_linear_layer(
          hidden_size, hidden_size, init_method
      )
      self.sequence_parallel = args.sequence_parallel
  
imports: import torch
  import torch.nn.functional
  from megatron import get_args
  from megatron.core import mpu, tensor_parallel
  from megatron.core.enums import ModelType
  from megatron.core.models.common.embeddings.rotary_pos_embedding import RotaryEmbedding
  from .enums import AttnMaskType, LayerType
  from .module import MegatronModule
  from .transformer import ParallelTransformer
  from .utils import get_linear_layer
  from .utils import init_method_normal, scaled_init_method_normal
label_desc: Use image node_id 1 to create a new Pooler object from inherited base classes: MegatronModule with example: obj = Pooler(hidden_size, init_method)