I am a newbie in Tensorflow and Keras and for the first moment I ask me the same few questions while I am creating my Neural Network. Even searching for some explanation of how to estructure, train, etc.


While you are structuring your model in a Neural Network I cant understand how people reach to an optimal number of layers and neurons, is ther any logic behind that having an amount of inputs says wicht amount of hidden layers and beurons use on each one?

Activatin Functions

Also there are many activation functions such as:

  • ReLu , the common one.
  • Softmax
  • Sigmoid
  • Linear

And more, I listed the ones that I see more, I know there are more and derivations of ReLu function. But my question for this section of building your Model is, Are there any relation between the type of input and the activation function while you are building?

Compiling & Training

Finally, in the training section I know there are diferent parts you can tune to have done repercussion on the model training and therefore on the result. Such as, the batch_size, the number of epochs, the loss function, the optimizer, etc. Also you can still modify (optimizer)some of those elements or even create your own ones and use it (loss function). But what about the number of epochs and the batch_size? What meaning does they have? I read that the learning rate have a relation with the batch_size used, I mean, low learning rate works better with more batch_size and vice versa.

I know my questions are quite ambiguous and quite general, but even seraching I still have them.

Thanks for reading me.

  • 1
    $\begingroup$ I was able to find duplicate threads to most of your questions by using the search feature. If you edit your question to focus just on the unanswered questions, this would be eligible to be reopened. Please note that this website works best when users ask exactly 1 question at a time. $\endgroup$
    – Sycorax
    May 28 at 13:10