Learning how to implement and train neural networks from scratch