Compiling to linear neurons