Skip to content

Implementarion of Semi-Supervised GANs from the paper "Improved Techniques for Training GANs"

Notifications You must be signed in to change notification settings

fmorenovr/Semi-Supervised-Learning_with_GAN_Keras

Repository files navigation

SSL-GAN_Keras

Implementarion of Semi-Supervised GANs from the paper "Improved Techniques for Training GANs".

To train, just need to install Tensorflow 2 (Im using 2.2 version, stable version in conda). You can try to install using conda:

  conda create --name tf2 python=3.8
  conda activate tf2
  conda install tensorflow-gpu=2.2.0
  conda install cudatoolkit=10.1
  conda install notebook
  conda install keras=2.2.0
  conda serach keras-applications
  conda install keras-applications

To add the Functions over Layers: WeightNormalization used in CIFAR10 discriminator/generator network, we use tensorflow-addons 0.11.2, due to the compatibility with Tensorflow 2.2.0, we run:

  pip install -q -U tensorflow-addons==0.11.2

But this command is already writed over the CIFAR10 notebook in the cell number 3.

MNIST Results

MNIST is a 10-class dataset containing images in gray scale. The data is composed by images of handwritten number (as you see below).

We train the model using 30 epochs, initial learning rate of 2e-5, Adam optimizer, 128 Batch size, and a label rate of 0.00166 (about 10 labeled samples per class).

You can find the Notebook associate here.

Original Generated Loss
MNIST original MNIST Generated MNIST Loss

We achieve 97.190% in classification testing:

Loss Accuracy
MNIST Loss MNIST Acc

CIFAR10 Results

CIFAR10 is a 10-class dataset containing images in RGB format. The data is composed by images of 10 different kind of objects like horses, frogs, dogs, cats, etc (as you see below).

We train the model using 500 epochs, initial learning rate of 2e-5, Adam optimizer, 128 Batch size, and a label rate of 1.00 (all labeled dataset).

You can find the Notebook associate here.

Original Generated Loss
CIFAR10 original CIFAR10 Generated CIFAR10 Loss

We achieve 75% in testing:

Loss Accuracy
CIFAR10 Loss CIFAR10 Acc

About

Implementarion of Semi-Supervised GANs from the paper "Improved Techniques for Training GANs"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published