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.