Probing Biological and Artificial Neural Networks with Task-dependent Neural Manifolds