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_)
      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 = cfg.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)
  
      height, width = bottom[0].data.shape[-2:]
      if DEBUG:
          print("AnchorTargetLayer: height", height, "width", width)
  
file_path: CNTK/Examples/Image/Detection/utils/caffe_layers/anchor_target_layer.py
imports: import os
  import yaml
  import numpy
  import numpy.random
  from utils.caffe_layers.default_config import cfg
  from utils.rpn.generate_anchors import generate_anchors
  from utils.rpn.bbox_transform import bbox_transform
  from utils.cython_modules.cython_bbox import bbox_overlaps
label_desc: Use image node_id 3 for calling the AnchorTargetLayer obj's underlying member method code with example usage: obj.setup(bottom, top) without return types