Synthesis of a recurrent double-layer transistor network for early-vision tasks