Differential and Algebraic Geometry of Multilayer Perceptrons