It does look like your gradient computation is wrong 
I would recommend to use gradcheck to debug it though as it will show you the Jacobian your function computes which makes it much easier to identify where the issue is 
# Use a small input to keep the Jacobian as small as possible
x = torch.randn(1, 2, 3, 3, requires_grad=True)
torch.autograd.gradcheck(bn, x)