Layerwise complexity-matched learning yields an improved model of cortical area V2