Skip to content

xheon/pytorch-sngan-color-overfit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNGAN Color Overfit

This is a simple GAN setup with spectral normalization using Python 3.7 and PyTorch 1.3.

Task

The task of the generative network is to generate a solid colored image of size 64x64.

Input data

The real target data is a solid color with the size 64x64. The color palette is adapted from the qualitative color map Set-1 from ColorBrewer.

color palette

Training

python train.py --gpu 0 --output_path "<output_path>"

Loss outputs

   10:	Loss(G): 0.6861     Loss(D): 0.6998     Real Pred.: 0.4968     Fake Pred.: 0.5034
   20:	Loss(G): 0.6948     Loss(D): 0.7061     Real Pred.: 0.4866     Fake Pred.: 0.4992
   30:	Loss(G): 0.6939     Loss(D): 0.6945     Real Pred.: 0.4983     Fake Pred.: 0.4996
   40:	Loss(G): 0.6676     Loss(D): 0.7009     Real Pred.: 0.5055     Fake Pred.: 0.5130
   50:	Loss(G): 0.6639     Loss(D): 0.7119     Real Pred.: 0.4964     Fake Pred.: 0.5148
   60:	Loss(G): 0.6232     Loss(D): 0.7265     Real Pred.: 0.5059     Fake Pred.: 0.5362
   70:	Loss(G): 0.7260     Loss(D): 0.6849     Real Pred.: 0.4924     Fake Pred.: 0.4838
   80:	Loss(G): 0.6976     Loss(D): 0.6964     Real Pred.: 0.4952     Fake Pred.: 0.4978
   90:	Loss(G): 0.8104     Loss(D): 0.6286     Real Pred.: 0.5151     Fake Pred.: 0.4447
  100:	Loss(G): 0.8660     Loss(D): 0.6519     Real Pred.: 0.4738     Fake Pred.: 0.4207
  ......

Image outputs

Each grid shows 6x6 generated samples from the generator with the same latent codes over time.

Iteration Output
00100 fake_00100
02500 fake_02500
05000 fake_05000
07500 fake_07500
10000 fake_10000

About

A simple SNGAN toy example to overfit on few solid colors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages