I am working on an image-to-image translation task.
There are multiple losses apart from L1 and GAN loss.
I notice that the copies of the original image and output are created for GAN loss.
I do not understand why  would we do that?
if I computed another loss, need i also create a copy?
I tried with several different cases.
one case is without copy, but the result (it is computed using  the original image or output, and it will be used for computing the loss) is assigned  to a new object.
the error is: element 0 of tensors does not require grad and  does not have a grad_fn.  (also came across: leaf variable has been moved into the graph interior )
then  I tried with a copy, but came across: no grad accumulator for a saved leaf.
what should i do?