NeuralNetwork implementation class