class_docstr: Generate anchors according to the feature maps
  
  Args:
      anchor_sizes (list[float] | list[list[float]]): The anchor sizes at 
          each feature point. list[float] means all feature levels share the 
          same sizes. list[list[float]] means the anchor sizes for 
          each level. The sizes stand for the scale of input size.
      aspect_ratios (list[float] | list[list[float]]): The aspect ratios at
          each feature point. list[float] means all feature levels share the
          same ratios. list[list[float]] means the aspect ratios for
          each level.
      strides (list[float]): The strides of feature maps which generate 
          anchors
      offset (float): The offset of the coordinate of anchors, default 0.
      
class_docstr_tok: ["Generate","anchors","according","to","the","feature","maps","Args",":","anchor_sizes","(","list","[","float","]","|","list","[","list","[","float","]","]",")",":","The","anchor","sizes","at","each","feature","point",".","list","[","float","]","means","all","feature","levels","share","the","same","sizes",".","list","[","list","[","float","]","]","means","the","anchor","sizes","for","each","level",".","The","sizes","stand","for","the","scale","of","input","size",".","aspect_ratios","(","list","[","float","]","|","list","[","list","[","float","]","]",")",":","The","aspect","ratios","at","each","feature","point",".","list","[","float","]","means","all","feature","levels","share","the","same","ratios",".","list","[","list","[","float","]","]","means","the","aspect","ratios","for","each","level",".","strides","(","list","[","float","]",")",":","The","strides","of","feature","maps","which","generate","anchors","offset","(","float",")",":","The","offset","of","the","coordinate","of","anchors",",","default","0","."]
code: def __init__(
      self,
      anchor_sizes=[32, 64, 128, 256, 512],
      aspect_ratios=[0.5, 1.0, 2.0],
      strides=[16.0],
      variance=[1.0, 1.0, 1.0, 1.0],
      offset=0.0,
  ):
      super(AnchorGenerator, self).__init__()
      self.anchor_sizes = anchor_sizes
      self.aspect_ratios = aspect_ratios
      self.strides = strides
      self.variance = variance
      self.cell_anchors = self._calculate_anchors(len(strides))
      self.offset = offset
  
imports: import math
  import paddle
  import paddle.nn
  import numpy
  from ppdet.core.workspace import register
label_desc: Use image node_id 1 to create a new AnchorGenerator object from inherited base classes: nn with example: obj = AnchorGenerator(anchor_sizes, aspect_ratios, strides, variance, offset)