Are there some guidelines for designing the architecture of neural networks? I started to study neural networks recently. I understand how I should define the input and output layers. But I can't find any guidelines on how to build hidden layers. More concretely, for each specific task, are there some guidelines (or rules of thumb) for answering the following questions?


How many layers do I need?
How many neurons per layer? 
What activation functions should I use?
How do I connect the neurons?
In general no. The research area that you seem to be looking for is called generalization, which is very much so still an active area of research. Actual architecture design strongly depends on the dataset itself and available resources, and thus there isn't a general rule of thumb that works for every case.