class_docstr: An implementation of the absolute position embedding in PVT.
  
  Args:
      pos_shape (int): The shape of the absolute position embedding.
      pos_dim (int): The dimension of the absolute position embedding.
      drop_rate (float): Probability of an element to be zeroed.
          Default: 0.0.
class_docstr_tok: ["An","implementation","of","the","absolute","position","embedding","in","PVT",".","Args",":","pos_shape","(","int",")",":","The","shape","of","the","absolute","position","embedding",".","pos_dim","(","int",")",":","The","dimension","of","the","absolute","position","embedding",".","drop_rate","(","float",")",":","Probability","of","an","element","to","be","zeroed",".","Default",":","0.0","."]
code: def init_weights(self):
      trunc_normal_(self.pos_embed, std=0.02)
  
imports: import math
  import warnings
  from collections import OrderedDict
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Conv2d, build_activation_layer, build_norm_layer
  from mmcv.cnn.bricks.drop import build_dropout
  from mmcv.cnn.bricks.transformer import MultiheadAttention
  from mmengine.logging import MMLogger
  from mmengine.model import BaseModule, ModuleList, Sequential, constant_init, normal_init, trunc_normal_init
  from mmengine.model.weight_init import trunc_normal_
  from mmengine.runner.checkpoint import CheckpointLoader, load_state_dict
  from torch.nn.modules.utils import _pair
  from mmdet.registry import MODELS
  from ..layers import PatchEmbed, nchw_to_nlc, nlc_to_nchw
label_desc: Use image node_id 2 for calling the AbsolutePositionEmbedding obj's underlying member method code with example usage: obj.init_weights() without return types