How to determine the number of Neurons in each hidden layer and number of hidden layers for face recognition

I plan to build a CNN for face recognition using this Kaggle dataset.

I tried building a model with a single hidden layer with 256 fully connected neurons, and it gave an accuracy of 45% after 55 epochs.

Should I just set the no. of hidden layers (and the no. of neurons in the layers) as variables, and repeat the model evaluation process for various values of the variables to determine the optimum values? Or is there any other, more efficient algorithm for tuning these hyperparameters?

If testing out the various values by brute force is indeed the only way, are there rules of thumb for initializing the no. of hidden layers to start with?

Topic convolutional-neural-network tensorflow image-classification deep-learning

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.