This line of code:
run_loss_disc+=loss_disc
looks wrong as you are accumulating the current discriminator loss including the entire computation graph.
If you want to accumulate the loss value only for printing purposes, use run_loss_dict += loss_dict.item()
or .detach()
the tensor.