parameters: (base_size, scales, aspect_ratios)
return_statement: return torch.from_numpy(anchors)
docstring: Generate anchor (reference) windows by enumerating aspect ratios X
      scales wrt a reference (0, 0, base_size - 1, base_size - 1) window.
docstring_summary: Generate anchor (reference) windows by enumerating aspect ratios X
      scales wrt a reference (0, 0, base_size - 1, base_size - 1) window.
docstring_tokens: Generate anchor ( reference ) windows by enumerating aspect ratios X scales wrt a reference ( 0 0 base_size - 1 base_size - 1 ) window .
function: def _generate_anchors(base_size, scales, aspect_ratios):
      """Generate anchor (reference) windows by enumerating aspect ratios X
      scales wrt a reference (0, 0, base_size - 1, base_size - 1) window.
      """
      anchor = np.array([1, 1, base_size, base_size], dtype=np.float) - 1
      anchors = _ratio_enum(anchor, aspect_ratios)
      anchors = np.vstack(
          [_scale_enum(anchors[i, :], scales) for i in range(anchors.shape[0])]
      )
      return torch.from_numpy(anchors)
function_tokens: def _generate_anchors ( base_size , scales , aspect_ratios ) : anchor = np . array ( [ 1 , 1 , base_size , base_size ] , dtype = np . float ) - 1 anchors = _ratio_enum ( anchor , aspect_ratios ) anchors = np . vstack ( [ _scale_enum ( anchors [ i , : ] , scales ) for i in range ( anchors . shape [ 0 ] ) ] ) return torch . from_numpy ( anchors )