# A TensorFlow GAN and VAE Collection with Fixed Architectures for Fair Comparison

> This repository bundles ten GAN variants and several VAEs in TensorFlow, all sharing the same generator and discriminator architecture so that the core idea of each model can be compared directly. It is a teaching and benchmarking resource, not a production library.

**hwalsuklee/tensorflow-generative-model-collections** — GitHub describes it as Collection of generative models in Tensorflow. The repository metadata lists Python as its primary language. The metadata lists the Apache-2.0 license. This article stays within the project description and details documented in the GitHub repository README.

- Repository: https://github.com/hwalsuklee/tensorflow-generative-model-collections
- Stars: 3,921 · Forks: 834
- Language: Python
- License: Apache-2.0
- Published: 2026-08-13 · Updated: 2026-08-18 · Language: en
- Canonical page: https://hysenlabs.com/projects/hwalsuklee-tensorflow-generative-model-collections

## What This Repository Actually Offers

The repository is a collection of TensorFlow implementations for ten GAN variants and at least four VAE variants. The GAN list includes GAN, LSGAN, WGAN, WGAN_GP, DRAGAN, CGAN, infoGAN, ACGAN, EBGAN, and BEGAN. The VAE list includes VAE, CVAE, DVAE, and AAE, though DVAE and AAE are marked as "to be added" in the README. The stated purpose is to provide a fair comparison of the core ideas behind each model. To achieve that, the generator and discriminator architectures are kept identical across all implementations, except for EBGAN and BEGAN, which use an auto-encoder structure for the discriminator. The author notes that even for those two, the discriminator capacity is kept similar. This is a deliberate design choice: you compare the loss function or the training procedure, not the network design. The target audience is likely someone learning generative models or researching new variants who wants a baseline set of implementations that are easy to run and modify.

## How the Fixed Architecture Enables Comparison

The README states that the network architecture of the generator and discriminator is exactly the same as in the infoGAN paper. This means that when you run GAN, LSGAN, WGAN, or any other variant, the only difference is the value function or the loss. The repo provides result tables for MNIST and Fashion-MNIST, with random generation and conditional generation panels. Each row in the conditional generation table shares the same noise vector, and each column shares the same label condition. This is a useful visualization trick: it lets you see how each model uses the label information. For instance, the README notes that without hyper-parameter tuning from the MNIST version, ACGAN tends to fall into mode collapse, and infoGAN tends to ignore the noise vector, so the style within the same class is not represented. That kind of observation is only possible when the architectures are matched. The trade-off is that the fixed architecture may not be optimal for every model. Some variants, like EBGAN and BEGAN, naturally use an auto-encoder discriminator, so the author had to modify the architecture, which slightly breaks the uniformity. Still, the effort to keep capacity similar is a reasonable compromise for a comparison-focused repository.

## Running the Models: Commands and Data Flow

The entry point is main.py. The README gives a clear command pattern: python main.py --dataset mnist --gan_type <TYPE> --epoch 25 --batch_size 64. For Fashion-MNIST, the same command works with --dataset fashion-mnist and --epoch 40. For the VAE manifold experiment, you use --dim_z 2 to reduce the latent dimension to two, which lets you visualize the learned manifold. The repository expects the data to be present in a data folder. The folder structure shows data/mnist with files like t10k-images-idx3-ubyte.gz and train-images-idx3-ubyte.gz, but the README notes that the data is not included in the repo. So you need to download the datasets yourself, or rely on whatever download script is in the code. The README does not specify a TensorFlow version, but the code is clearly written for TensorFlow 1.x, given the era and the style. The data flow is straightforward: main.py parses arguments, loads the dataset, builds the model based on gan_type, and runs training for the specified epochs. The results are presumably saved as images, though the README does not detail the output format.

## What the Results Show, and What They Do Not

The README includes result tables for MNIST and Fashion-MNIST, with images at different epochs. For MNIST, the command uses 25 epochs; for Fashion-MNIST, 40 epochs. The results are meant to be reproducible with those exact commands. The README also makes qualitative observations: VAE generates smooth and blurry images, while GAN generates sharp and artifact images. That is a well-known trade-off, and the repo demonstrates it visually. For conditional generation, the README notes that ACGAN and infoGAN do not work as well as CGAN without hyper-parameter tuning. Specifically, ACGAN tends to fall into mode collapse, and infoGAN tends to ignore the noise vector. These are honest observations, and they are useful because they show that a model that works on one dataset may not transfer to another without adjustment. However, the README does not provide any quantitative metrics like Inception Score or FID. The author points to the compare_gan repository for that, which includes IS/FID and rich experimental results. So this repo is for visual inspection and qualitative comparison, not for rigorous benchmarking. If you need numbers, you should look elsewhere.

## Limitations: TensorFlow 1.x and Incomplete Sections

The most obvious limitation is that the code is written for TensorFlow 1.x. The README does not state a version, but the repository has no recent releases and the last push is unknown, so it is likely stale. Running it on TensorFlow 2.x would require significant changes, such as replacing tf.Session and other deprecated APIs. Another limitation is that the README marks several sections as "to be added": celebA results, DVAE, AAE, and some variant structures. So the repository is not complete. It covers the core GAN and VAE families, but not the full spectrum. Also, the data is not included, so you must handle dataset downloads yourself. The README does not explain how to download the data, only where to place it. That could be a hurdle for someone who expects a quick start. Finally, the fixed architecture is a limitation if you want to use these models on higher-resolution images. The architecture is designed for 28x28 grayscale images, and the README only shows results for MNIST and Fashion-MNIST. celebA is mentioned but not yet added, so there is no evidence that it works on larger, color images. For that, you would need to modify the network significantly.

## Alternatives: compare_gan and the PyTorch Port

The README itself points to two alternatives. The first is google/compare_gan, which is the code used for the paper "Are GANs Created Equal? A Large-Scale Study". That repository provides Inception Score and FID metrics, along with rich experimental results for all GAN variants. The key difference is that compare_gan focuses on quantitative evaluation and large-scale experiments, while this repository focuses on visual comparison with fixed architectures. If you need to measure performance, compare_gan is the better choice. The second alternative is the PyTorch version of this repository, available at pytorch-generative-model-collections. That port likely has the same structure and commands, but uses PyTorch instead of TensorFlow. If you are working in PyTorch, that is a more natural fit. The difference is the framework, which affects how you integrate the code into your own projects. Neither alternative is maintained more actively, based on what is visible here, but compare_gan has the advantage of being backed by a published paper and a more comprehensive evaluation framework.

## Maintenance and License Considerations

The repository is licensed under Apache-2.0, which is permissive and allows commercial use, modification, and distribution, provided you preserve the license notice. That is a low barrier for adoption. However, the maintenance status is a concern. The repository is not archived, but there are no recent releases and the last push is unknown. The README has sections marked "to be added", which suggests the author intended to continue, but there is no evidence of active development. For a project like this, that means you are on your own if you encounter bugs or want to upgrade to a newer TensorFlow version. The code is also tied to TensorFlow 1.x, which is no longer supported by the TensorFlow team. That is a significant maintenance cost: you would need to either pin an old TensorFlow version, which may have security issues, or rewrite the code for TensorFlow 2.x. The folder structure is simple, with main.py as the gateway and a data folder for datasets, so the code is not large, but the dependency on a deprecated framework is the main cost. If you are using this for learning, that might be acceptable. If you are building a product, it is a risk.

## Conclusion

Adopt this repository if you are a student or researcher who wants to see how different GAN and VAE formulations behave on MNIST or Fashion-MNIST with identical network capacity. Avoid it if you need a maintained, production-ready generative model library or plan to work with TensorFlow 2.x, since the code targets TensorFlow 1.x and the repository has no recent releases. Before using it, verify that your TensorFlow version matches the code's assumptions, and check whether the dataset download scripts still function, as the README does not specify a supported TensorFlow version.

## FAQ

### What does tensorflow-generative-model-collections contain?

One TensorFlow file per model at the top level, with main.py as the gateway and ops.py, prior_factory.py and utils.py shared beside them. The GAN list names ten variants and the VAE list four, but the tree carries VAE.py and CVAE.py only, with no DVAE.py or AAE.py.

### How do you reproduce the results in tensorflow-generative-model-collections?

With python main.py --dataset mnist --gan_type <TYPE> --epoch 25 --batch_size 64. The file does not enumerate the accepted values for the type placeholder, and the mnist IDX data files are marked as not included in the repository.

### Which GAN variants does tensorflow-generative-model-collections list?

GAN, LSGAN, WGAN, WGAN_GP, DRAGAN, CGAN, infoGAN, ACGAN, EBGAN and BEGAN, each with a paper link. A third column headed Value Function is present in that table and is empty for all ten rows.

### What problems does tensorflow-generative-model-collections report about its own models?

On fashion-mnist, without hyper-parameter tuning carried over from the mnist version, ACGAN and infoGAN do not work well compared with CGAN. ACGAN tends to fall into mode-collapse, and infoGAN tends to ignore the noise vector, so various styles within the same class cannot be represented.

### Is tensorflow-generative-model-collections still being worked on?

The branch was last pushed on 8 August 2022 and the repository has no GitHub releases, so there is no tagged version to pin to. The tree also contains no dependency manifest, so no TensorFlow version is stated anywhere.

## Sources

- [Official README](https://github.com/hwalsuklee/tensorflow-generative-model-collections#readme)
- [Project repository](https://github.com/hwalsuklee/tensorflow-generative-model-collections)
- [README](https://github.com/hwalsuklee/tensorflow-generative-model-collections/blob/master/README.md)
- [Releases](https://github.com/hwalsuklee/tensorflow-generative-model-collections/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/hwalsuklee-tensorflow-generative-model-collections
