class_docstr: Assign anchors to ground-truth targets. Produces anchor classification
  labels and bounding-box regression targets.
class_docstr_tok: ["Assign","anchors","to","ground-truth","targets",".","Produces","anchor","classification","labels","and","bounding-box","regression","targets","."]
code: def setup(self, bottom, top):
      # layer_params = yaml.load(self.param_str_)
  
      layer_params = dict()
      layer_params["feat_stride"] = 16
      layer_params["scales"] = (8, 16, 32)
      layer_params["allowed_border"] = 0
      self.RPN_NEGATIVE_OVERLAP = 0.3
      self.RPN_POSITIVE_OVERLAP = 0.7
      self.RPN_FG_FRACTION = 0.5
      self.RPN_BATCHSIZE = 256
      self.EPS = 1e-14
      self.RPN_BBOX_INSIDE_WEIGHTS = 1
      self.RPN_POSITIVE_WEIGHT = -1
  
      anchor_scales = layer_params.get("scales", (8, 16, 32))
      self._anchors = generate_anchors(scales=np.array(anchor_scales))
      self._num_anchors = self._anchors.shape[0]
      self._feat_stride = layer_params["feat_stride"]
  
      if DEBUG:
          # print 'anchors:'
          # print self._anchors
          # print 'anchor shapes:'
          # print np.hstack((
          #     self._anchors[:, 2::4] - self._anchors[:, 0::4],
          #     self._anchors[:, 3::4] - self._anchors[:, 1::4],
          # ))
          self._counts = self.EPS
          self._sums = np.zeros((1, 4))
          self._squared_sums = np.zeros((1, 4))
          self._fg_sum = 0
          self._bg_sum = 0
          self._count = 0
  
      # allow boxes to sit over the edge by a small amount
      self._allowed_border = layer_params.get("allowed_border", 0)
  
file_path: neon/examples/faster-rcnn/tests/anchor_target_layer_ref.py
imports: from __future__ import division
  from __future__ import print_function
  from builtins import range
  from builtins import object
  import numpy
  import numpy.random
  from generate_anchors import generate_anchors
  from util import bbox_transform
label_desc: Use image node_id 1 for calling the AnchorTargetLayer obj's underlying member method code with example usage: obj.setup(bottom, top) without return types