Keras-GAN
Keras-GAN copied to clipboard
How many labeled data are used in SGAN.py?
As we know, semi-supervised GANs focus on small portion labeled data. In MNIST task, people often use 1000 label examples vs 59000 unlabel examples. But in SGAN.py, it looks like all label are used?
Please go through following lines: d_loss_real = self.discriminator.train_on_batch(imgs, [valid, labels], class_weight=[cw1, cw2]) d_loss_fake = self.discriminator.train_on_batch(gen_imgs, [fake, fake_labels], class_weight=[cw1, cw2])
In first training, valid labels are used, in second, fake labels are used.