This is the implementation of the D2GAN(Dual-Discriminator GAN) using pytorch, paper
It uses two discriminator. one sees real data as real, however another one sees real data as fake.
According to the paper, loss function is different from ordinary GAN. Therefore, I made custom loss function. It might be unstable(e.g. explode when training, converges into inf/-inf)
Result is sames as below. I used two datasets, STL10 and CIFAR10
result from 64x64 STL10, generated by model
result from 64x64 CIFAR10, generated by model
In the paper, they used 32x32 size images, so I converted DCGAN's architecture, changing kernel size of Ds and G's first layers to 4.
its result is same as below.
result from 32x32 CIFAR10, generated by model
result from 32x32 CIFAR10, from the paper
result from 32x32 STL10, generated by model
show much better result on 32x32 data. Also converges much faster than ordinary GAN
On your console/terminal, type
python main.py
- revise custom loss(doesn't update its state for long iteration)
- clamp networks' gradient
- apply to more datasets
- argparser