class_docstr: 2D image to patch embedding: (B,C,H,W) -> (B,N,D)
  
  Args:
      img_size: Image size.
      patch_size: Patch token size.
      in_chans: Number of input image channels.
      embed_dim: Number of linear projection output channels.
      norm_layer: Normalization layer.
code: def __init__(
      self,
      img_size: Union[int, Tuple[int, int]] = 224,
      patch_size: Union[int, Tuple[int, int]] = 16,
      in_chans: int = 3,
      embed_dim: int = 768,
      norm_layer: Optional[Callable] = None,
      flatten_embedding: bool = True,
  ) -> None:
      super().__init__()
  
      image_HW = make_2tuple(img_size)
      patch_HW = make_2tuple(patch_size)
      patch_grid_size = (
          image_HW[0] // patch_HW[0],
          image_HW[1] // patch_HW[1],
      )
  
      self.img_size = image_HW
      self.patch_size = patch_HW
      self.patches_resolution = patch_grid_size
      self.num_patches = patch_grid_size[0] * patch_grid_size[1]
  
      self.in_chans = in_chans
      self.embed_dim = embed_dim
  
      self.flatten_embedding = flatten_embedding
  
      self.proj = nn.Conv2d(
          in_chans, embed_dim, kernel_size=patch_HW, stride=patch_HW
      )
      self.norm = norm_layer(embed_dim) if norm_layer else nn.Identity()
  
file_path: dinov2/dinov2/layers/patch_embed.py
imports: from typing import Callable, Optional, Tuple, Union
  from torch import Tensor
  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_chans, embed_dim, norm_layer, flatten_embedding)