Personal repository to learn about different types of GAN models using Keras.
- Clone this repo.
git clone https://github.com/RajK853/GAN.git $SRC_DIR- Create and activate conda environment.
cd $SRC_DIR
conda env create -f environment.yml
conda activate gan-envImplementation of normal Generative Adversarial Network.
Implementation of Auxiliary Classifier Generative Adversarial Network.
Implementation of normal Bidirectional Generative Adversarial Network.
Train models
- Create a YAML config file (let's say
config_1.yaml) as:
default: &default_config
epochs: 1000
latent_size: 50
batch_size: 128
evaluate_interval: 5
lr: 0.0003
num_evaluates: 10
GAN_latent_50:
<<: *default_config
model: GAN
GAN_latent_100:
<<: *default_config
model: GAN
latent_size: 100
ACGAN:
<<: *default_config
model: ACGAN
BiGAN:
<<: *default_config
model: BiGAN
- Train the models by loading the parameters from the above YAML config file as:
python train.py config_1.yamlThe above config file will train GAN, ACGAN and BiGAN models with two different latent_size values for the GAN model only.
Any configuration with the key name with the prefix
defaultwill not be executed by default.
Feedforward layer configurations can be passed via
layer_configsargument. Please look inexample_configsdirectory for the sample YAML configuration file.
