@yuxihu @apeforest I made a mistake in the example. The value of spatial_scale should be 1.0. So the statement 'mx.nd.ROIAlign(x, y, (2, 2), 0.7)' should be 'mx.nd.ROIAlign(x, y, (2, 2), 1.0)'. If you rerun the example, the output will be [[[[5.25, 6.75], [14.25, 15.75]]]].
I think the output should be [[[[3,5, 5.5], [15.5, 17.5]]]] Because y = mx.nd.array([[0,0,0,3,3]]) means the start coordinate is (0, 0) and the end coordinate is (3, 3). The RoI is [ 0., 1., 2., 3.], [ 6., 7., 8., 9.], [ 12., 13., 14., 15.], [ 18., 19., 20., 21.] Since pooled_size = (2, 2), and both of the height and width of RoI are 4, which can be divisible by pooled_size. According to the description of ROIAlign, we can compute the each value of the output, for example, 3.5 = (0 + 1 + 6 + 7) / 4, and so on. [ Full content available at: https://github.com/apache/incubator-mxnet/issues/12403 ] This message was relayed via gitbox.apache.org for [email protected]
