Computational tools for understanding biological and artificial neural networks