Trying to developp a generic neural network