Thank you for your reply.
Now I use a register_backward_hook to process the grad_input of a Conv layer without bias. It raise TypeError: expected Variable, but hook returned 'NoneType' when the hook function return grad_data, grad_weight, None to replace the original grad_input.
It seems that I cannot return a None. But what should I return if I don’t have a bias?