Inside Function, we don’t change the .requires_grad field of existing Tensors. But the forward runs in no grad mode. This means that the output an operation on a Tensor that does require gradients won’t require gradients.
The backward runs with grad mode enabled so it should behave as any other python function.
Do you see changes that you didn’t except in your case?