Skip to content

Lornatang/PyTorch-WGANGP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Convolution Generative Adversarial Networks

This project has been abandoned. The new project address is "https://github.com/Lornatang/WassersteinGAN_GP-PyTorch"

Introduction

This example implements the paper Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks

The implementation is very close to the Torch implementation main.py

After every 100 training iterations, the files real_samples.png and fake_samples.png are written to disk with the samples from the generative model.

After every epoch, models are saved to: netG_epoch_%d.pth and netD_epoch_%d.pth

Configure

Load dataset

download data put on ./datasets folder.

Thanks 何之源

datasets/
└── faces/
    ├── 0000fdee4208b8b7e12074c920bc6166-0.jpg
    ├── 0001a0fca4e9d2193afea712421693be-0.jpg
    ├── 0001d9ed32d932d298e1ff9cc5b7a2ab-0.jpg
    ├── 0001d9ed32d932d298e1ff9cc5b7a2ab-1.jpg
    ├── 00028d3882ec183e0f55ff29827527d3-0.jpg
    ├── 00028d3882ec183e0f55ff29827527d3-1.jpg
    ├── 000333906d04217408bb0d501f298448-0.jpg
    ├── 0005027ac1dcc32835a37be806f226cb-0.jpg

Purpose

Use a stable DCGAN structure to generate avatar images of anime girls.

Usage

  • train

if you want pretrain generate model, click it netg_200.pth

if you want pretrain discriminate model, click it netd_200.pth

please rename model name. netd_200.pth -> D.pth and netg_200.pth -> G.pth

start run:

python main.py
  • test
python main.py --phase generate

Example

  • epoch 1

epoch1.png

  • epoch 30

epoch30.png

  • epoch 100

epoch100.png

  • epoch 200

epoch200.png

About

PyTorch implements WGAN_GP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages