We can use the following example(ROIPooling exmple from MxNet)  to test:

import mxnet as mx
x = mx.nd.array([[[[  0.,   1.,   2.,   3.,   4.,   5.],
       [  6.,   7.,   8.,   9.,  10.,  11.],
       [ 12.,  13.,  14.,  15.,  16.,  17.],
       [ 18.,  19.,  20.,  21.,  22.,  23.],
       [ 24.,  25.,  26.,  27.,  28.,  29.],
       [ 30.,  31.,  32.,  33.,  34.,  35.],
       [ 36.,  37.,  38.,  39.,  40.,  41.],
       [ 42.,  43.,  44.,  45.,  46.,  47.]]]])

// region of interest i.e. bounding box coordinates.
y = mx.nd.array([[0,0,0,3,3]])

// returns array of shape (2,2) according to the given roi with max pooling.
mx.nd.ROIPooling(x, y, (2,2), 1.0) = [[[[ 7.,  9.],
                                                           [ 19.,  21.]]]]
mx.nd.ROIAlign(x, y, (2, 2), 1.0) = [[[[5.25, 6.75],
                                                         [14.25, 15.75]]]]

I think the result of mx.nd.ROIAlign(x, y, (2, 2), 1.0) should be the same as 
mx.nd.ROIPooling(x, y, (2,2), 1.0). 

[ Full content available at: 
https://github.com/apache/incubator-mxnet/issues/12403 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to