class_docstr: Position encoding with sine and cosine functions.
  
  See `End-to-End Object Detection with Transformers
  <https://arxiv.org/pdf/2005.12872>`_ for details.
  
  Args:
      num_feats (int): The feature dimension for each position
          along x-axis or y-axis. Note the final returned dimension
          for each position is 2 times of this value.
      temperature (int, optional): The temperature used for scaling
          the position embedding. Defaults to 10000.
      normalize (bool, optional): Whether to normalize the position
          embedding. Defaults to False.
      scale (float, optional): A scale factor that scales the position
          embedding. The scale will be used only when `normalize` is True.
          Defaults to 2*pi.
      eps (float, optional): A value added to the denominator for
          numerical stability. Defaults to 1e-6.
      offset (float): offset add to embed when do the normalization.
          Defaults to 0.
      init_cfg (dict or list[dict], optional): Initialization config dict.
          Default: None
class_docstr_tok: ["Position","encoding","with","sine","and","cosine","functions",".","See","`","End-to-End","Object","Detection","with","Transformers","<","https",":","\/\/arxiv.org\/pdf\/2005.12872",">","`","_","for","details",".","Args",":","num_feats","(","int",")",":","The","feature","dimension","for","each","position","along","x-axis","or","y-axis",".","Note","the","final","returned","dimension","for","each","position","is","2","times","of","this","value",".","temperature","(","int",",","optional",")",":","The","temperature","used","for","scaling","the","position","embedding",".","Defaults","to","10000.","normalize","(","bool",",","optional",")",":","Whether","to","normalize","the","position","embedding",".","Defaults","to","False",".","scale","(","float",",","optional",")",":","A","scale","factor","that","scales","the","position","embedding",".","The","scale","will","be","used","only","when","`","normalize","`","is","True",".","Defaults","to","2","*","pi",".","eps","(","float",",","optional",")",":","A","value","added","to","the","denominator","for","numerical","stability",".","Defaults","to","1e-6",".","offset","(","float",")",":","offset","add","to","embed","when","do","the","normalization",".","Defaults","to","0.","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","config","dict",".","Default",":","None"]
docstr: str: a string that describes the module
docstr_tok: ["str",":","a","string","that","describes","the","module"]
code: def __repr__(self):
      """str: a string that describes the module"""
      repr_str = self.__class__.__name__
      repr_str += f"(num_feats={self.num_feats}, "
      repr_str += f"temperature={self.temperature}, "
      repr_str += f"normalize={self.normalize}, "
      repr_str += f"scale={self.scale}, "
      repr_str += f"eps={self.eps})"
      return repr_str
  
file_path: dinov2/dinov2/eval/segmentation_m2f/models/utils/positional_encoding.py
imports: import math
  import torch
  import torch.nn
  from mmcv.cnn.bricks.transformer import POSITIONAL_ENCODING
  from mmcv.runner import BaseModule
label_desc: Use image node_id 3 for calling the SinePositionalEncoding obj's underlying member method code with example usage: obj.__repr__() and returns: repr_str