jalola / improved-wgan-pytorch

Improved WGAN in Pytorch
MIT License
439 stars 68 forks source link

Is Wasserstein-distance calculated correctly? #28

Closed LidaGuo1999 closed 1 year ago

LidaGuo1999 commented 1 year ago

Hi, jalola

Thanks for your sharing. However, I find that your wasserstein-distance is calculated as d_fake-d_real. Shouldn't it be d_real-d_fake?

jalola commented 1 year ago

Hi @LidaGuo1999 ,

Right, probably it was copied from the loss line disc_cost = disc_fake - disc_real + gradient_penalty or we wanted to visualise it as a positive number. It does not affect the training.

LidaGuo1999 commented 1 year ago

@jalola Yeah, this does not affect the training. Thanks.