class_docstr: PatchEmbed.
class_docstr_tok: ["PatchEmbed","."]
code: def __init__(
      self,
      dim_in=3,
      dim_out=768,
      kernel=(1, 16, 16),
      stride=(1, 4, 4),
      padding=(1, 7, 7),
      conv_2d=False,
  ):
      super().__init__()
      self.conv_2d = conv_2d
      if self.conv_2d:
          conv = Conv2d
      else:
          conv = Conv3d
      self.proj = conv(  # pylint: disable=too-many-function-args,unexpected-keyword-arg
          dim_in,
          dim_out,
          kernel_size=kernel,
          stride=stride,
          padding=padding,
      )
      self.output_t = 1
      self.output_h = None
      self.output_w = None
  
imports: import math
  from functools import partial
  from typing import Tuple, List
  import numpy
  import torch
  from torch import nn
  from torch.nn.init import trunc_normal_
  from einops import rearrange
  from towhee.models.layers.layers_with_relprop import GELU, Linear, Dropout, Conv2d, Conv3d, Softmax, Sigmoid, LayerNorm, Einsum, Add, Clone, MaxPool3d, IndexSelect
label_desc: Use image node_id 1 to create a new PatchEmbed object from inherited base classes: nn with example: obj = PatchEmbed(dim_in, dim_out, kernel, stride, padding, conv_2d)