https://medium.com/@monocosmo77/applications-of-automatic-differentiation-part3-machine-learning-cf6dbeb0b594