tmp.grad is the grad of tmp with respect to tmp, which is of little use.
You probably want filters.grad.
Generally the input should be a Variable not a Parameter and most of the time you don’t need or want the input to requires_grad.