@Test
public void testNeuralNetFunction() throws IOException, JnnException {

    final JnnNet neuralNet = readNeuralNet();
    final SdrAlgorithm algorithm = new SdrAlgorithm(neuralNet);
    final double[][] testVectors = readTestPixels();
    for (double[] testVector : testVectors) {
        double[] input = new double[testVector.length - 1];
        double[] actualOutput = new double[1];
        double[] expectedOutput = new double[1];
        System.arraycopy(testVector, 0, input, 0, input.length);
        expectedOutput[0] = testVector[testVector.length - 1];
        algorithm.computeSdr(input, actualOutput);
        assertEquals(expectedOutput[0], actualOutput[0], EPS);
    }
}