Solved by sio277 in post #2 
              
              
                I don’t know much about the paper you mentioned, but the error is caused because you tried to backpropagate the created graph (generated_images = net(noise))  more than once through the inner for loop. General usage is, put your forward (generated_images = net(noise)) inside the inner for loop, such…