"Inference: making predictions (forward propagation)" lecture neuron numbers


Why did Andrew pick 25 neurons for the first layer if the image is 8x8?
Shouldn’t we have 64 neurons in the first layer?
In addition, why 15 neurons in the second layer?
What is the criteria for determining the number of neurons in a layer?

Kind regards,

It is just trial and error. Experimentation. There is no fixed rule.

hi saifkhanengr,

Thanks for the response. So Andrew just picked random numbers to create the neural network, not related to the image size/pixel numbers?

All the hyperparameters are chosen after the experimentation that effectively serves the learning objective.

Thanks for the response, appreciate it