Neural Network Hidden Layer Selection
First try a simple model: The input layer and the output layers dimension are defined by your data / your problem definition. Then train a model without any hidden layer.
See how good it performs. Is it good enough? If yes, you're done. If no, continue
Add a hidden layer of reasonable size or adjust a hidden layers size. Go to step (2).


The "reasonable" size part might be difficult. As a guidance: If you have only a single node, it is certainly too small for a 1000 class problem. It might be big enough for a 2 - 3 class problem. I would usually suggest to keep the size of the features per layer roughly constant or at most reduce it by 1/10 or triple it. But that is only gut feeling.

The reason for my preference for simple models is Occam's razor, the fact that they are often faster, easier to analyze and to manually improve.

For more information about topology learning and rules how to design neural networks, see:


  Thoma, Martin. "Analysis and Optimization of Convolutional Neural Network Architectures." arXiv preprint arXiv:1707.09725 (2017).


Especially chapter 2.5 and chapter 3.