<p>Nobody really knows why certain architectures work, that is still a topic of ongoing discussion (see, e.g., <a href="https://arxiv.org/abs/1706.05394" rel="nofollow noreferrer">this paper</a>).</p>

<p>Finding architectures that work is mostly trial and error, and adopting or modifying existing architectures that seem to work well for related tasks and dataset sizes.</p>

<p>I would refer you to <a href="https://www.deeplearningbook.org" rel="nofollow noreferrer">Goodfellow, Bengio, and Courville's book</a>, it is a great resource to get started with machine learning and deep learning in particular.</p>
How do you know which layers and how many layers to use?
<p>I am new to machine learning and have spent some time learning python. I have started to learn TensorFlow and Keras for machine learning and I literally have no clue nor any understanding of the process to make the model. How do you know which models to use? which activation functions to use? The amount of layers and dimensions of the output space?  </p>

<p>I've noticed most models were the Sequential type, and tend to have 3 layers, why is that? I couldn't find any resources that explain which to use, why we use them, and when. The best I could find was tensorflow's function details. Any elaboration or any resources to clarify would be greatly appreciated. </p>

<p>Thanks.  </p>