In the video on Training details of TensorFlow implementation, Prof. Andrew Ng mentioned it is beneficial to know how to implement NN models from scratch and not merely use libraries like TF & PyTorch.
Where can I learn to do this? Any good book or online resource for proceeding?
Definitely, as @gent.spah mentioned. Deep Learning Specialization is the way to go. There you will at the beginning of the course a fully connected network from scratch.
How to choose the number of neurons(logistic regressions) in a layer? For ex, in that predicting the number 0 or 1, they used 25 neurons in first layer, then 15 in second and 1 in the last. How to figure this out?