Hi,
You need to make sure that you set the requires_grad field before using the img to compute the noisy_img.
If you do so, can you share the code that generates the noisy image as well as the error you see?