MengZephyr / HairGANs

The Networks for "Hair-GAN: Recovering 3D Hair Structure from a Single Image using Generative Adversarial Networks"
GNU General Public License v3.0
148 stars 26 forks source link

why the loss of generator only contains feature loss and style loss? #5

Open ANYMS-A opened 4 years ago

ANYMS-A commented 4 years ago

Hi, I was kind of confused why the self.G_loss only contains the feature loss and the style loss? If so, i think it might not be a GAN's advresarial training process, because you only update the parameters of the Generator based on the feature loss and style loss but not the adversarial loss.

MengZephyr commented 4 years ago

Hi, I was kind of confused why the self.G_loss only contains the feature loss and the style loss? If so, i think it might not be a GAN's advresarial training process, because you only update the parameters of the Generator based on the feature loss and style loss but not the adversarial loss.

The GAN model used here is based on WGAN-GP. The adversarial loss please find the line:

self.D_loss = tf.reduce_mean(self.D_fake)-tf.reduce_mean(self.D_real) + grad_pen