class_docstr: 2D Image to Patch Embedding
code: def __init__(
      self,
      img_size=224,
      patch_size=16,
      in_c=3,
      embed_dim=768,
      norm_layer=None,
  ):
      super().__init__()
      img_size = (img_size, img_size)
      patch_size = (patch_size, patch_size)
      self.img_size = img_size
      self.patch_size = patch_size
      self.grid_size = (
          img_size[0] // patch_size[0],
          img_size[1] // patch_size[1],
      )
      self.num_patches = self.grid_size[0] * self.grid_size[1]
  
      self.proj = nn.Conv2d(
          in_c, embed_dim, kernel_size=patch_size, stride=patch_size
      )
      self.norm = norm_layer(embed_dim) if norm_layer else nn.Identity()
  
imports: from functools import partial
  from collections import OrderedDict
  import torch
  import torch.nn
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_c, embed_dim, norm_layer)