Code Monkey home page Code Monkey logo

gan's Introduction

GAN

Data Preparation

data_root_dir
    train
        1.jpg
        2.jpg
        ......
    val
        1.jpg
        2.jpg
        ......

Hyper Parameters

CUDA_VISIBLE_DEVICES: specify which GPUs to use, for example "0,1"
epoch: number of training iterations
batch_size: sample batch size of one training step g_init_lr: initial learning rate of generator g_final_lr: final learning rate of generator
d_init_lr: initial learning rate of discriminator
d_final_lr: final learning rate of discriminator
noise_dim: dimension of noise, if use_cnn is True, shape of noise will be [noise_dim, 1, 1], if use_cnn is False, shape of noise will be [noise_dim]
d_train_times: train the generator every d_train_times times the discriminator is trained
data_root_dir: data root directory
num_workers: num_workers of pytorch data loader
img_size: size of image generated from generator, if use_cnn is True, img_size will be 2 ** len(generator_features), len(generator_features) is length of generator_features
save_img_total_step: perform image generation every save_img_total_step steps of training and save the image
img_count: the number of images generated each time
discriminator_weight_min: min value of weight of discriminator discriminator_weight_max: max value of weight of discriminator
use_cnn: if specified as True, the convolution neural network is used, otherwise the MLP is used
generator_features: channels of every layer of generator if use_cnn is True, number of neurons of every layer if use_cnn is False
img_save_dir: storage directory for generated images

Train

python train.py

gan's People

Contributors

1991yuyang avatar

Stargazers

 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.