With two-photon imaging we investigated neuroplasticity changes in neuronal population in the mouse somatosensory cortex, corresponding to the whiskers (barrel cortex). Imaging was performed daily over months of learning a complex task (two-alternative forced choice task). We an increase in neuronal activity in response to the same sensory stimulus correlating with learning. Furthermore, there were differences in online processing at the level of the primary sensory cortex, depending on whether the mouse was behaviorally engaged in the task or showing no behavioral response. We also compared training of rats and mice in the same complex task and found that the two species learn at comparable rates.