GithubHelp home page GithubHelp logo

kikumu / dcgan-with-facedata Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 89.34 MB

This repository Investigates DCGAN using facedata. Serves as a personal cautionary tale when working with GANS.

License: Other

Jupyter Notebook 99.37% Python 0.63%
conv2d dcgan-pytorch upsample

dcgan-with-facedata's Introduction

DCGAN-with-facedata

This repository Investigates DCGAN using facedata. Serves as a personal cautionary tale when working with GANS.

Some important stuff I learnt

  • Please make sure you normalize and rescale the training data properly in the order described. Normalize/standardise first(zero mean unit variance) then rescale. Doing this the reverse way may be a cause of headache.
  • Kernel sizes and strides are hugely important. Please, please ensure that your kernel sizes at least learn something and are big(or small) enough to capture reasonable data from the input.
  • Play around with various loss functions. If one loss function 'isnt working for you', please feel free to try other loss functions available that are mostly used for these systems.
  • Hyperparameters are massively important in GANS i.e learning rates, kernel sizes, strides, padding, what you normalize/standardize it by even the rescale min/max. Keep adjusting these parameters appropriately until you see the model is learning something. If you have poor hyperparameters just forget about model convergence.
  • Monitor gradient flow both in generator and discriminator. Especially the discriminator. A good gradient flow in the discriminator will greatly influence generator performance.
  • Investigate general model structure using torch.summary especially backward/forward pass size. If the size seems abit off compared to what you se online then something somewhere is wrong. From my experience its mostly, well, hyperparameters(latent space size, kernel size and stride length).
  • Adding noise and dropouts to the network is helpful. But before you add some spice to your network please ensure your hyperparameters are good and gradients are flowing.
  • Optimizer is also one of the major factors. Adam optimizer is seen to work best.
  • Low learning rates help but to some degree. Requires trial and error to determine what learning rate is best.

Hopefully these points will help you save alot of time when you have trouble training a GAN :)

dcgan-with-facedata's People

Contributors

kikumu avatar

Watchers

 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.