The gradients will be calculated using the loss calculated by feat, that’s correct.
However, as explained, the forward pass using G_result might update e.g. the running statistics of batch norm layers, if they are used in the model.
If you don’t want to update these stats, you could set the model to model.eval() before passing G_result to it, and back to model.train() afterwards.
How large is the difference in final accuracy and what variance do you expect?
I.e. if you run your code without the G_result forward pass (with different seeds, if you set them), how large is the variance in final accuracy then compared to your current run?