F.interpolate won’t detach the computation graph and the output tensor will have UpsampleNearest2DBackward as its .grad_fn.
You could check the model for valid gradients by printing them inside the loop just to make sure the parameters are still being updated.