Added perceptron trainer class and test for netwroks