Hi,
I am not getting what you are trying to achieve by “I’m trying to train the input of the model.”. When optimizer.step() is called, the gradients are accumulated to image tensor which changes the value of the tensor. So I am guessing that your input (image tensor) is getting changed and not your model.