class_docstr: Module to add position embedding to input features
  Args:
      dim (int): dimension
      spatial_shape (int): spatial shape
code: def __init__(
      self,
      dim=384,
      spatial_shape=[14, 14],
  ):
      super().__init__()
      if isinstance(spatial_shape, int):
          spatial_shape = [spatial_shape]
      assert isinstance(spatial_shape, Sequence), (
          f'"spatial_shape" must by a sequence or int, '
          f"get {type(spatial_shape)} instead."
      )
      if len(spatial_shape) == 1:
          embed_shape = list(spatial_shape) + [dim]
      else:
          embed_shape = [dim] + list(spatial_shape)
      self.pos_embed = nn.Parameter(torch.zeros(1, *embed_shape))
  
imports: from torch import nn
  import torch
  from typing import Sequence
label_desc: Use image node_id 1 to create a new AddPositionEmb object from inherited base classes: nn with example: obj = AddPositionEmb(dim, spatial_shape)