class_docstr: AnchorGenerator by paddle
class_docstr_tok: ["AnchorGenerator","by","paddle"]
code: def __init__(
      self, base_size, scales, ratios, scale_major=True, ctr=None
  ):
      super(S2ANetAnchorGenerator, self).__init__()
      self.base_size = base_size
      self.scales = paddle.to_tensor(scales)
      self.ratios = paddle.to_tensor(ratios)
      self.scale_major = scale_major
      self.ctr = ctr
      self.base_anchors = self.gen_base_anchors()
  
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 S2ANetAnchorGenerator object from inherited base classes: nn with example: obj = S2ANetAnchorGenerator(base_size, scales, ratios, scale_major, ctr)