Thank you for your answers.
A simplified version of my loss function is loss = (y_a - y_b)
So yes, I am using the two predictions in loss computation. But, as I perform  a single zero_grad, I think that this yields to gradients accumulation a not to only take into account the last gradient from the last prediction at one step.