MCPcopy Index your code
hub / github.com/hwalsuklee/tensorflow-generative-model-collections

github.com/hwalsuklee/tensorflow-generative-model-collections @main

repository ↗ · DeepWiki ↗ · + Follow
157 symbols 500 edges 16 files 3 documented · 2% updated 3y ago★ 3,91919 open issues
README

tensorflow-generative-model-collections

Tensorflow implementation of various GANs and VAEs.

Related Repositories

Pytorch version

Pytorch version of this repository is availabel at https://github.com/znxlwm/pytorch-generative-model-collections

"Are GANs Created Equal? A Large-Scale Study" Paper

https://github.com/google/compare_gan is the code that was used in the paper.
It provides IS/FID and rich experimental results for all gan-variants.

Generative Adversarial Networks (GANs)

Lists

Name | Paper Link | Value Function :---: | :---: | :--- | GAN | Arxiv | LSGAN| Arxiv | WGAN| Arxiv | WGAN_GP| Arxiv | DRAGAN| Arxiv | CGAN| Arxiv | infoGAN| Arxiv | ACGAN| Arxiv | EBGAN| Arxiv | BEGAN| Arxiv |

Variants of GAN structure

Results for mnist

Network architecture of generator and discriminator is the exaclty sames as in infoGAN paper.
For fair comparison of core ideas in all gan variants, all implementations for network architecture are kept same except EBGAN and BEGAN. Small modification is made for EBGAN/BEGAN, since those adopt auto-encoder strucutre for discriminator. But I tried to keep the capacity of discirminator.

The following results can be reproduced with command:

python main.py --dataset mnist --gan_type <TYPE> --epoch 25 --batch_size 64

Random generation

All results are randomly sampled.

Name | Epoch 2 | Epoch 10 | Epoch 25 :---: | :---: | :---: | :---: | GAN | | | LSGAN | | | WGAN | | | WGAN_GP | | | DRAGAN | | | EBGAN | | | BEGAN | | |

Conditional generation

Each row has the same noise vector and each column has the same label condition.

Name | Epoch 1 | Epoch 10 | Epoch 25 :---: | :---: | :---: | :---: | CGAN | | | ACGAN | | | infoGAN | | |

InfoGAN : Manipulating two continous codes

Results for fashion-mnist

Comments on network architecture in mnist are also applied to here.
Fashion-mnist is a recently proposed dataset consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. (T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot)

The following results can be reproduced with command:

python main.py --dataset fashion-mnist --gan_type <TYPE> --epoch 40 --batch_size 64

Random generation

All results are randomly sampled.

Name | Epoch 1 | Epoch 20 | Epoch 40 :---: | :---: | :---: | :---: | GAN | | | LSGAN | | | WGAN | | | WGAN_GP | | | DRAGAN | | | EBGAN | | | BEGAN | | |

Conditional generation

Each row has the same noise vector and each column has the same label condition.

Name | Epoch 1 | Epoch 20 | Epoch 40 :---: | :---: | :---: | :---: | CGAN | | | ACGAN | | | infoGAN | | |

Without hyper-parameter tuning from mnist-version, ACGAN/infoGAN does not work well as compared with CGAN.
ACGAN tends to fall into mode-collapse.
infoGAN tends to ignore noise-vector. It results in that various style within the same class can not be represented.

InfoGAN : Manipulating two continous codes

Some results for celebA

(to be added)

Variational Auto-Encoders (VAEs)

Lists

Name Paper Link Loss Function
VAE Arxiv
CVAE Arxiv
DVAE Arxiv (to be added)
AAE Arxiv (to be added)

Variants of VAE structure

Results for mnist

Network architecture of decoder(generator) and encoder(discriminator) is the exaclty sames as in infoGAN paper. The number of output nodes in encoder is different. (2x z_dim for VAE, 1 for GAN)

The following results can be reproduced with command:

python main.py --dataset mnist --gan_type <TYPE> --epoch 25 --batch_size 64

Random generation

All results are randomly sampled.

Name | Epoch 1 | Epoch 10 | Epoch 25 :---: | :---: | :---: | :---: | VAE | | | GAN | | |

Results of GAN is als

Core symbols most depended-on inside this repo

bn
called by 61
ops.py
linear
called by 52
ops.py
check_folder
called by 36
utils.py
save_images
called by 32
utils.py
lrelu
called by 32
ops.py
deconv2d
called by 26
ops.py
conv2d
called by 22
ops.py
load_mnist
called by 12
utils.py

Shape

Method 113
Function 32
Class 12

Languages

Python100%

Modules by API surface

utils.py15 symbols
infoGAN.py11 symbols
LSGAN.py11 symbols
EBGAN.py11 symbols
DRAGAN.py11 symbols
ACGAN.py11 symbols
WGAN_GP.py10 symbols
WGAN.py10 symbols
VAE.py10 symbols
GAN.py10 symbols
CVAE.py10 symbols
CGAN.py10 symbols

For agents

$ claude mcp add tensorflow-generative-model-collections \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact