class_docstr: Convolutional patch embedding layer.
class_docstr_tok: ["Convolutional","patch","embedding","layer","."]
docstr: Build patch embedding layer.
  
  Args:
      patch_size: Patch size for embedding computation.
      stride: Stride for convolutional embedding layer.
      in_channels: Number of channels of input tensor.
      embed_dim: Number of embedding dimensions.
      inference_mode: Flag to instantiate model in inference mode. Default: ``False``
code: def __init__(
      self,
      patch_size: int,
      stride: int,
      in_channels: int,
      embed_dim: int,
      inference_mode: bool = False,
  ) -> None:
      """Build patch embedding layer.
  
      Args:
          patch_size: Patch size for embedding computation.
          stride: Stride for convolutional embedding layer.
          in_channels: Number of channels of input tensor.
          embed_dim: Number of embedding dimensions.
          inference_mode: Flag to instantiate model in inference mode. Default: ``False``
      """
      super().__init__()
      block = list()
      block.append(
          ReparamLargeKernelConv(
              in_channels=in_channels,
              out_channels=embed_dim,
              kernel_size=patch_size,
              stride=stride,
              groups=in_channels,
              small_kernel=3,
              inference_mode=inference_mode,
          )
      )
      block.append(
          MobileOneBlock(
              in_channels=embed_dim,
              out_channels=embed_dim,
              kernel_size=1,
              stride=1,
              padding=0,
              groups=1,
              inference_mode=inference_mode,
              use_se=False,
              num_conv_branches=1,
          )
      )
      self.proj = nn.Sequential(*block)
  
imports: import os
  import copy
  from functools import partial
  from typing import List, Tuple, Optional, Union
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.models.layers import DropPath, trunc_normal_
  from timm.models.registry import register_model
  from models.modules.mobileone import MobileOneBlock
  from models.modules.replknet import ReparamLargeKernelConv
label_desc: Use image node_id 1 to create a new PatchEmbed object from inherited base classes: nn with example: obj = PatchEmbed(patch_size, stride, in_channels, embed_dim, inference_mode)