code: def __init__(self, in_chans, embed_dim, resolution, activation):
      super().__init__()
      if isinstance(resolution, int):
          resolution = (resolution,) * 2
      img_size = resolution
      self.patches_resolution = (img_size[0] // 4, img_size[1] // 4)
      self.num_patches = (
          self.patches_resolution[0] * self.patches_resolution[1]
      )
      self.in_chans = in_chans
      self.embed_dim = embed_dim
      n = embed_dim
      self.seq = nn.Sequential(
          Conv2d_BN(in_chans, n // 2, 3, 2, 1),
          activation(),
          Conv2d_BN(n // 2, n, 3, 2, 1),
      )
  
imports: import itertools
  import paddle
  from paddle import nn
  from paddle.nn import functional
  from .common import LayerNorm2d
label_desc: Use image node_id 1 to create a new PatchEmbed object from inherited base classes: nn with example: obj = PatchEmbed(in_chans, embed_dim, resolution, activation)