Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.54 KB

readme.md

File metadata and controls

32 lines (27 loc) · 1.54 KB

Bidirectional GAN - Pytorch implementation

This is the pytorch implementation of Bidirectional GAN(BiGAN). Unlike ordinary GANs which are focused on generating data, the Bidirectional GAN is focused on creating an embedding of the original data. The model has an additional "Encoder" Structure from the original GAN which helps to encode original data. The descriminator will then discriminate the joint distribution of the latent vector and original data. The paper theoretically proves that the latent embedding will become an inverse mapping of the original input data when trained properly.

Implementation Notes

There are not many, but a few, references for BiGAN. However, I wasn't able to find a pytorch version and without a convolutional structure. My codes are implemented in MLP style where the image is flattened. The model structure were referenced from this great github repo. However, I made some minor adjustments as the implemented model struck on mode collapse.

Requirements

Main dependencies (with python=3.6)  
pytorch = 1.6.0  
torchvision = 0.7.0  

Installation

pip install requirements.txt

Run

python main.py

Results

Epoch 1
Image1
Epoch 69
Image1
Epoch 250
Image1
Epoch 399
Image1