roi_average_pooling_2d(x, rois, roi_indices, outsize, spatial_scale)¶
Spatial Region of Interest (ROI) average pooling function.
This function acts similarly to
average_pooling_2d(), but it computes the average of input spatial patch for each channel with the region of interest.
x (Variable) – Input variable. The shape is expected to be 4 dimentional: (n: batch, c: channel, h, height, w: width).
rois (Variable) – Input roi variable. The shape is expected to be (n: data size, 4), and each datum is set as below: (y_min, x_min, y_max, x_max).
roi_indices (Variable) – Input roi variable. The shape is expected to be (n: data size, ).
spatial_scale (float) – Scale of the roi is resized.
- Return type
See the original paper proposing ROIPooling: Fast R-CNN.