Apply the average roi align. [He, 2017].

The rois should be packed with a shape like \((N, 5)\), where \(N\) is the number of RoIs.

Each RoI is a 5d sequence containing (batch_index, x1, y1, x2, y2).

  • inputs (Sequence[dragon.Tensor]) – The tensor feature and rois.
  • pooled_h (int, required) – The output height.
  • pooled_w (int, required) – The output width.
  • spatial_scale (float, optional, default=1.) – The input scale to the size of rois.
  • sampling_ratio (int, optional, default=2) – The number of sampling grids for rois.

dragon.Tensor – The output tensor.