AI-enabled flexible electronic systems via near-sensor and in-sensor computing | Synapse