eli2014 commented on issue #12403: roi_align.cc
URL: 
https://github.com/apache/incubator-mxnet/issues/12403#issuecomment-417166702
 
 
   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). 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to