faster_rcnn_pytorch icon indicating copy to clipboard operation
faster_rcnn_pytorch copied to clipboard

RoIPooling can not pass the gradcheck

Open lvpengyuan opened this issue 7 years ago • 2 comments

I use the gradcheck function in torch.autograd to check the grad of RoIPooling, and the result is False.

lvpengyuan avatar Oct 12 '17 12:10 lvpengyuan

Similar issue here, I found that RoIPoolingFunction will always output zero.

cuda 8.0, cudnn 6.0, pytorch 0.2.0

blackyang avatar Oct 19 '17 02:10 blackyang

I encountered the issue in another Faster-RCNN repo(https://github.com/jwyang/faster-rcnn.pytorch). The analytical gradients of the output from the gradcheck function in pytorch are all zero. But when I print the gradient results in RoIPooling module by myself, it is not. Is it the bug of pytorch? Meanwhile, it seems like the numerical gradients of numerical is not stable with eps. When I set eps to be 1e-6, the numerical gradients are also output zero. When I set the eps to be 1e-4, the gradients at the maxid position is approximate to 1.

dingjiansw101 avatar May 04 '18 03:05 dingjiansw101