@Test
    public void testPerLayerExpression() {
        String input = "{ {x:1}:0, {x:2}:1 }"; // tensor0
        String firstLayerWeights = "{ {x:1,h:1}:1, {x:1,h:2}:1, {x:2,h:1}:1, {x:2,h:2}:1 }"; // tensor1
        String firstLayerBias = "{ {h:1}:-0.5, {h:2}:-1.5 }"; // tensor2
        String firstLayerInput = "sum(tensor0 * tensor1, x) + tensor2";
        String firstLayerOutput = "min(1.0, max(0.0, 0.5 + " + firstLayerInput + "))"; // non-linearity, "poor man's sigmoid"
        assertEvaluates("{ {h:1}:1.0, {h:2}:0.0 }", firstLayerOutput, input, firstLayerWeights, firstLayerBias);
        String secondLayerWeights = "{ {h:1,y:1}:1, {h:2,y:1}:-1 }"; // tensor3
        String secondLayerBias = "{ {y:1}:-0.5 }"; // tensor4
        String secondLayerInput = "sum(" + firstLayerOutput + "* tensor3, h) + tensor4";
        String secondLayerOutput = "min(1.0, max(0.0, 0.5 + " + secondLayerInput + "))"; // non-linearity, "poor man's sigmoid"
        assertEvaluates("{ {y:1}:1 }", secondLayerOutput, input, firstLayerWeights, firstLayerBias, secondLayerWeights, secondLayerBias);
    }
"XOR" neural network, separate expression per layer
searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/NeuralNetEvaluationTestCase.java