class_docstr: This is a more standard version of the position embedding, very similar
  to the one used by the Attention is all you need paper, generalized to work
  on images.
  
  Adapted from https://github.com/shannanyinxiang/SPTS.
class_docstr_tok: ["This","is","a","more","standard","version","of","the","position","embedding",",","very","similar","to","the","one","used","by","the","Attention","is","all","you","need","paper",",","generalized","to","work","on","images",".","Adapted","from","https",":","\/\/github.com\/shannanyinxiang\/SPTS","."]
code: def __init__(
      self,
      num_pos_feats=64,
      temperature=10000,
      normalize=True,
      scale=None,
  ):
      super().__init__()
      self.num_pos_feats = num_pos_feats
      self.temperature = temperature
      self.normalize = normalize
      if scale is not None and normalize is False:
          raise ValueError(
              "normalize should be True if scale is passed"
          )
      if scale is None:
          scale = 2 * math.pi
      self.scale = scale
  
imports: import math
  import torch
  from torch import Tensor, nn
label_desc: Use image node_id 1 to create a new PositionEmbeddingSine object from inherited base classes: nn with example: obj = PositionEmbeddingSine(num_pos_feats, temperature, normalize, scale)