plt.figure(figsize=(10,5)) plt.title("Generator and Discriminator Loss During Training") plt.plot(G_losses,[label](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor")="G") plt.plot(D_losses,[label](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor")="D") plt.xlabel("iterations") plt.ylabel("Loss") plt.legend() plt.show()