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.
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.
Main dependencies (with python=3.6)
pytorch = 1.6.0
torchvision = 0.7.0
pip install requirements.txt
python main.py
Epoch 1
Epoch 69
Epoch 250
Epoch 399
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。