You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/28 02:29:06 UTC

[GitHub] eli2014 commented on issue #12403: roi_align.cc bug?

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

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services