Skip to content

AsajuHuishi/Generate_a_quadratic_image_with_GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

PyTorch GAN

It is the raw code to generate a quadratic girl image from a random noise array using a GAN(Generative Adversarial Networks ) network. It is based on ([GAN二次元头像生成Pytorch实现(附完整代码)(https://blog.csdn.net/qq_36937684/article/details/106215485)]

This article is Pytorch version of Li Hongyi GAN course assignments, HW3_1 (quadratic image generation, Keras implementation). The reason for writing this article is that on the one hand, I want to understand GAN, and on the other hand, I am used to using Pytorch, so I changed keras into Pytorch version.

Requirements

  • PyTorch
  • torchvision
  • visdom
  • matplotlib

Training

Resources required for implementation:

link: https://pan.baidu.com/s/1cLmFNQpJe1DOI96IVuvVyQ extract code: nha2

usage: [--train][--GPU]
    [--continue_training] [--cuda]

    [--datapath] [--latent_dim]
    [--num_epoch] [--batch_size]

Example:

python shizuo_gan_new.py --cuda --GPU 1 --batch_size 64 --train 1 --num_epoch 300

This will start a training session in the GPU.

Testing

usage: [--test] [--GPU]
    [--cuda] [--testmodelpath]
    [--datapath] [--latent_dim]

Results

The result is no different from the original keras. After all, the network is similar and does not need too high expectations. Moreover, the network itself is relatively small. Partial results are shown here.

About

GAN二次元头像生成Pytorch实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages