Hi, during training I use Dataparallel to trian a model and I’d like to get the gradient of the input of the first layer of the model. I use register_backward_hook. But when I modified some unrelated codes, sometimes the gradient can be gotten, sometimes not. I am extremely confused.