General purpose neural network