Hi,
To be useful, you would need to del the Tensors corresponding to the computationnal graph: discriminator_loss, discriminator_loss_fake, pred_labels_fake …
A simpler solution might just be to enclose this into a function call. That way, all intermediary results will go out of scope even if you don’t backward.