GithubHelp home page GithubHelp logo

hahehaling / transgan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from milmor/transgan

0.0 0.0 0.0 62.61 MB

Implementation of Transformer-based GAN Model in Tensorflow

License: MIT License

Python 100.00%

transgan's Introduction

TransGAN

Implementation of the Transformer-based GAN model in the paper:

TransGAN: Two Pure Transformers Can Make One Strong GAN, and That Can Scale Up.

Architecture

See here for the official Pytorch implementation.

Dependencies

  • Python 3.8
  • Tensorfow 2.5

Usage

Train

  1. Use --dataset_path=<path> to provide the dataset path (default builds CIFAR-10 dataset) and --model_name=<name> to provide the checkpoint directory name.
python train.py --dataset_path=<path> --model_name=<name> 

Hparams setting

Adjust hyperparameters on the hparams.py file.

Tensorboard

Run tensorboard --logdir ./.

Examples

  • CIFAR-10 training progress

References

Code:

  • This model depends on other files that may be licensed under different open source licenses.
  • TransGAN uses Differentiable Augmentation. Under BSD 2-Clause "Simplified" License.
  • Small-TransGAN models are instances of the original TransGAN architecture with a smaller number of layers and lower-dimensional embeddings.

Implementation notes:

  • Single layer per resolution Generator.
  • Orthogonal initializer and 4 heads in both Generator and Discriminator.
  • WGAN-GP loss.
  • Adam with β1 = 0.0 and β2 = 0.99.
  • Noise dimension = 64.
  • Batch size = 64

Licence

MIT

transgan's People

Contributors

milmor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.