Two-layered neural network