Deep Neural Networks in a Mathematical Framework