Search code examples
grid-searchgenerative-adversarial-networkhyperparameters

Hyperparameter tuning for GANs using Grid Search


I am working on GANs right now. And the main problem I am facing that is tuning the hyperparameters. This is one of the big problem for GANs. As I research about hyperparameters tuning I found the name Grid Searching. So, I want to use this grid search for tuning the Hyperparameter's of GANs. I don't understand how to introduce this. If any one have the idea about this please help. Or any better idea about tuning the Hyperparameter's of GANs then share.

Thank You.


Solution

  • You can use the following kera function : https://www.tensorflow.org/tutorials/keras/keras_tuner

    You can specify which hyper parameter you want to test, their range of values, etc. You can test different learning rates, number of layers, activation functions and more.

    You can also look at the following sklearn package: https://machinelearningmastery.com/grid-search-hyperparameters-deep-learning-models-python-keras/

    This being said, hyper parameter tuning is pretty expensive, especially for GANs which are already hard to train, as you said.

    It might be better to start the training on a smaller subset of the data to get a good idea of the hyper parameters to use and then run hyper parameter tuning on a smaller subset of hyper parameters.