Toward a Physics of Deep Learning and Brains