Text this: In situ training of an in-sensor artificial neural network based on ferroelectric photosensors