In GAN implementations, BCE loss is used to express GAN loss.
As I know, GAN loss have two KLD terms (which is 2*JSD).
then how can I lead torch.nn.KLDivLoss to GAN loss ?

image.png811×208 24.1 KB


image.png892×229 17.4 KB


image.png902×393 37 KB