Sparse deep neural networks for modeling physical and biological systems