PDE methods for deep learning analysis and optimization