code: def __init__(self, dim_in, dim_out, kernel_sizes, stride=2):
      super().__init__()
      kernel_sizes = sorted(kernel_sizes)
      num_scales = len(kernel_sizes)
  
      # calculate the dimension at each scale
      dim_scales = [
          int(dim_out / (2**i)) for i in range(1, num_scales)
      ]
      dim_scales = [*dim_scales, dim_out - sum(dim_scales)]
  
      self.convs = nn.ModuleList([])
      for kernel, dim_scale in zip(kernel_sizes, dim_scales):
          self.convs.append(
              nn.Conv2d(
                  dim_in,
                  dim_scale,
                  kernel,
                  stride=stride,
                  padding=(kernel - stride) // 2,
              )
          )
  
imports: import torch
  from torch import nn, einsum
  from einops import rearrange
  from einops.layers.torch import Rearrange, Reduce
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new CrossEmbedLayer object from inherited base classes: nn with example: obj = CrossEmbedLayer(dim_in, dim_out, kernel_sizes, stride)