This is the code for Training Triplet Networks with GAN (arXiv).
The code is based on Improved Techniques with GAN (arXiv) (code)
Official Code Repo - Github
Use the package manager pip to install all required libraries.
pip install requirements.txt
or
conda create --name <env> --file requirements.txt
For pretraining the Triplet GAN we have used Improved Techniques with GAN for without the triplet loss function.
For Pretraining for MNIST data use pretrain.py --config_file configs/pretrain_gan.yml
For training the triplet GAN after pretraining use main.py --config_file configs/triplet_gan.yaml
m = 16 | m = 32 | |||
---|---|---|---|---|
N = 100 | N = 200 | N = 100 | N = 200 | |
Accuracy | 0.9813 | 0.9819 | 0.9826 | 0.9833 |
mAP | 0.9345 | 0.9501 | 0.9330 | 0.9473 |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.