This repo contains script for a simple GAN model to benchmark its performance accross different platforms.
(for clarity this benchmarks the training duration only)
Model | System | Processor | GPU | Time Taken for the model to train | inference time |
---|---|---|---|---|---|
GAN-hands-100kbatch-100epochs | Personal | core i7 | Gtx 1060-6GB | 4.455 minutes | |
GAN-hands-100kbatch-100epochs | AWS | gdn4.xlarge | T4-16GB | 3.952 minutes | |
GAN-hands-100kbatch-100epochs | Personal | core i7 | - | 25.348 minutes |
- notebook/ - stores notebook format which can be run directly.
- data/ - (to be created) this will store the downloaded data required for training.
- src/ - source code directory.
- static/ - contains image files.
- src/hyperparameters - contains the hyper params. If OOM issues occur, we need to reduce the
batchsize
in the json file.
- Download the data from googleStorage API.
- python 3.7+
- tqdm (
pip install tqdm
) - numpy (
pip install numpy
) - sklearn (
pip install -U scikit-learn
) - matplotlib (
pip install matplotlib
) - tensorflow (
pip install tensorflow
)
(after all the needed packages are installed)
- Download or clone this repo.
mkdir data
wget https://storage.googleapis.com/quickdraw_dataset/full/numpy_bitmap/hand.npy
(not needed if data has already been downloaded)- store the
hand.npy
dataset in thedata/
directory. cd src
python model.py
- notebook with full execution has been provided in this directory.
- Any of the two notebook can be run independently after installing required packages.
This repo is just for quick benchmarking.
Running the above model for only 100 epochs wont yeild good results.
For good results epoch should be around 500, and batchsize ~ 1000