class_docstr: Image to Patch Embedding
      
code: def __init__(self, patch_size=7, stride=4, in_chans=3, embed_dim=768):
      super().__init__()
      patch_size = to_2tuple(patch_size)
      assert (
          max(patch_size) > stride
      ), "Set larger patch_size than stride"
      self.patch_size = patch_size
      self.proj = nn.Conv2d(
          in_chans,
          embed_dim,
          patch_size,
          stride=stride,
          padding=(patch_size[0] // 2, patch_size[1] // 2),
      )
      self.norm = nn.LayerNorm(embed_dim)
  
imports: import math
  from typing import Tuple, List, Callable, Union
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, to_ntuple, trunc_normal_, LayerNorm, use_fused_attn
  from ._builder import build_model_with_cfg
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 1 to create a new OverlapPatchEmbed object from inherited base classes: nn with example: obj = OverlapPatchEmbed(patch_size, stride, in_chans, embed_dim)