class_docstr: Image to Patch Embedding
  Args:
      img_size (int, optional): Image size.  Default: 224.
      patch_size (int, optional): Patch token size. Default: 4.
      in_chans (int, optional): Number of input image channels. Default: 3.
      embed_dim (int, optional): Number of linear projection output channels. Default: 96.
      norm_layer (nn.Layer, optional): Normalization layer. Default: None
class_docstr_tok: ["Image","to","Patch","Embedding","Args",":","img_size","(","int",",","optional",")",":","Image","size",".","Default",":","224.","patch_size","(","int",",","optional",")",":","Patch","token","size",".","Default",":","4.","in_chans","(","int",",","optional",")",":","Number","of","input","image","channels",".","Default",":","3.","embed_dim","(","int",",","optional",")",":","Number","of","linear","projection","output","channels",".","Default",":","96.","norm_layer","(","nn.Layer",",","optional",")",":","Normalization","layer",".","Default",":","None"]
code: def __init__(
      self,
      img_size=224,
      patch_size=4,
      in_chans=3,
      embed_dim=96,
      norm_layer=None,
  ):
      super().__init__()
      img_size = to_2tuple(img_size)
      patch_size = to_2tuple(patch_size)
      patches_resolution = [
          img_size[0] // patch_size[0],
          img_size[1] // patch_size[1],
      ]
      self.img_size = img_size
      self.patch_size = patch_size
      self.patches_resolution = patches_resolution
      self.num_patches = patches_resolution[0] * patches_resolution[1]
  
      self.in_chans = in_chans
      self.embed_dim = embed_dim
  
      self.proj = nn.Conv2D(
          in_chans, embed_dim, kernel_size=patch_size, stride=patch_size
      )
      if norm_layer is not None:
          self.norm = norm_layer(embed_dim)
      else:
          self.norm = None
  
imports: import numpy
  import paddle
  import paddle.nn
  from medicalseg.cvlibs import manager, param_init
  from medicalseg.utils import load_pretrained_model
  from medicalseg.models.backbones.transformer_utils import DropPath, to_2tuple
label_desc: Use image node_id 1 to create a new PatchEmbed object from inherited base classes: nn with example: obj = PatchEmbed(img_size, patch_size, in_chans, embed_dim, norm_layer)