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 _calculate_anchors(self, num_features):
      sizes = self._broadcast_params(self.anchor_sizes, num_features)
      aspect_ratios = self._broadcast_params(
          self.aspect_ratios, num_features
      )
      cell_anchors = [
          self.generate_cell_anchors(s, a)
          for s, a in zip(sizes, aspect_ratios)
      ]
      [
          self.register_buffer(t.name, t, persistable=False)
          for t in cell_anchors
      ]
      return cell_anchors
  
imports: import math
  import paddle
  import paddle.nn
  import numpy
  from ppdet.core.workspace import register
label_desc: Use image node_id 4 for calling the AnchorGenerator obj's underlying member method code with example usage: obj._calculate_anchors(num_features) and returns: cell_anchors