class_docstr: PoolFormer
  Args:
      layers (tuple[int]): number of blocks for the 4 stages
      embed_dims (tuple[int]): embedding dimension
      mlp_ratios (tuple[float]): mlp ratios
      pool_size (int): pooling size
      norm_layer (nn.module): normalization layer
      act_layer (nn.module): activation layer
      num_classes (int): number of classes
      in_patch_size (int): patch embedding size
      in_stride (int): stride of patch embedding
      in_pad (int): padding
      down_patch_size (int): down sample path size
      down_pad (int): down sample padding
      drop_rate (float): drop rate
      drop_path_rate (float): drop path rate
      use_layer_scale (bool): use layer scale
      layer_scale_init_value (float): layer scale init value
      fork_feat (bool): layer scale init value
      init_cfg (dict): config for init
      pretrained (bool): pretrained
class_docstr_tok: ["PoolFormer","Args",":","layers","(","tuple","[","int","]",")",":","number","of","blocks","for","the","4","stages","embed_dims","(","tuple","[","int","]",")",":","embedding","dimension","mlp_ratios","(","tuple","[","float","]",")",":","mlp","ratios","pool_size","(","int",")",":","pooling","size","norm_layer","(","nn.module",")",":","normalization","layer","act_layer","(","nn.module",")",":","activation","layer","num_classes","(","int",")",":","number","of","classes","in_patch_size","(","int",")",":","patch","embedding","size","in_stride","(","int",")",":","stride","of","patch","embedding","in_pad","(","int",")",":","padding","down_patch_size","(","int",")",":","down","sample","path","size","down_pad","(","int",")",":","down","sample","padding","drop_rate","(","float",")",":","drop","rate","drop_path_rate","(","float",")",":","drop","path","rate","use_layer_scale","(","bool",")",":","use","layer","scale","layer_scale_init_value","(","float",")",":","layer","scale","init","value","fork_feat","(","bool",")",":","layer","scale","init","value","init_cfg","(","dict",")",":","config","for","init","pretrained","(","bool",")",":","pretrained"]
code: def cls_init_weights(self, m):
      if isinstance(m, nn.Linear):
          trunc_normal_(m.weight, std=0.02)
          if isinstance(m, nn.Linear) and m.bias is not None:
              nn.init.constant_(m.bias, 0)
  
imports: from torch import nn
  import torch
  import os
  import copy
  from towhee.models.poolformer.patchembed import PatchEmbed
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.poolformer.basic_blocks import basic_blocks
  from towhee.models.poolformer.groupnorm import GroupNorm
label_desc: Use image node_id 2 for calling the PoolFormer obj's underlying member method code with example usage: obj.cls_init_weights(m) without return types