class_docstr: Image to Patch Embedding.
  
  Args:
      img_size (int | tuple): Input image size.
          default: 224.
      patch_size (int): Width and height for a patch.
          default: 16.
      in_channels (int): Input channels for images. Default: 3.
      embed_dim (int): The embedding dimension. Default: 768.
class_docstr_tok: ["Image","to","Patch","Embedding",".","Args",":","img_size","(","int","|","tuple",")",":","Input","image","size",".","default",":","224.","patch_size","(","int",")",":","Width","and","height","for","a","patch",".","default",":","16.","in_channels","(","int",")",":","Input","channels","for","images",".","Default",":","3.","embed_dim","(","int",")",":","The","embedding","dimension",".","Default",":","768","."]
code: def forward(self, x):
      return self.proj(x).flatten(2).transpose(1, 2)
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from annotator.uniformer.mmcv.cnn import Conv2d, Linear, build_activation_layer, build_norm_layer, constant_init, kaiming_init, normal_init
  from annotator.uniformer.mmcv.runner import _load_checkpoint
  from annotator.uniformer.mmcv.utils.parrots_wrapper import _BatchNorm
  from annotator.uniformer.mmseg.utils import get_root_logger
  from ..builder import BACKBONES
  from ..utils import DropPath, trunc_normal_
label_desc: Use image node_id 2 for calling the PatchEmbed obj's underlying member method code with example usage: obj.forward(x) and returns: self