class_docstr: Image to Patch Embedding
class_docstr_tok: ["Image","to","Patch","Embedding"]
code: def __init__(
      self,
      img_size=224,
      patch_size=16,
      in_chans=3,
      embed_dim=768,
      std=False,
  ):
      super().__init__()
      img_size = to_2tuple(img_size)
      patch_size = to_2tuple(patch_size)
      num_patches = (img_size[1] // patch_size[1]) * (
          img_size[0] // patch_size[0]
      )
      self.img_size = img_size
      self.patch_size = patch_size
      self.num_patches = num_patches
      self.norm = nn.LayerNorm(embed_dim)
      if std:
          self.proj = conv_3xnxn_std(
              in_chans,
              embed_dim,
              kernel_size=patch_size[0],
              stride=patch_size[0],
          )
      else:
          self.proj = conv_1xnxn(
              in_chans,
              embed_dim,
              kernel_size=patch_size[0],
              stride=patch_size[0],
          )
  
imports: from collections import OrderedDict
  import torch
  from torch import nn
  from torch.utils import checkpoint
  from functools import partial
  from towhee.models.utils.general_utils import to_2tuple
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.layers.droppath import DropPath
  from towhee.models.layers.mlp import Mlp
  from towhee.models.layers.attention import MultiHeadAttention
  from towhee.models.uniformer.config import _C
  import os
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, std)