jalola / improved-wgan-pytorch

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

A question about loss_G.backward(Mone) #9

Closed EliotChenKJ closed 5 years ago

EliotChenKJ commented 5 years ago

First, i have to thank for your sharing of this work, it does help me understanding the wgan-gp better, but here is a little question:

l've just got to know wgan-gp recently, so hope the author can help me with this question.

jalola commented 5 years ago

Hi, Thanks for asking, basically mone is minus one tensor. So in the loss, this is the same to: gen_cost = -gen_cost gen_cost.backward()

You can check this issue: https://github.com/jalola/improved-wgan-pytorch/issues/1

EliotChenKJ commented 5 years ago

Ok, now i understand its meaning. Thank for ur answer~