Learning transistor