RoIPooling can not pass the gradcheck
lvpengyuan opened this issue · 2 comments
I use the gradcheck function in torch.autograd to check the grad of RoIPooling, and the result is False.
Similar issue here, I found that RoIPoolingFunction will always output zero.
cuda 8.0, cudnn 6.0, pytorch 0.2.0
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.