myPerceptron.learnInSameThread(trainingSet);
// test perceptron
System.out.println("Testing trained perceptron");
testNeuralNetwork(myPerceptron, trainingSet);
// save trained perceptron
myPerceptron.save("mySamplePerceptron.nnet");
// load saved neural network
NeuralNetwork loadedPerceptron = NeuralNetwork.load("mySamplePerceptron.nnet");
// test loaded neural network
System.out.println("Testing loaded perceptron");
testNeuralNetwork(loadedPerceptron, trainingSet);