Adding source code for the tutorial tracked under BAEL-2759 (#6533)

This commit is contained in:
Kumar Chandrakant
2019-03-15 11:22:27 +05:30
committed by Grzegorz Piwowarek
parent b3fc27088b
commit dc72b8b397
8 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package org.baeldung.tensorflow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.Test;
import org.tensorflow.Graph;
public class TensorflowGraphUnitTest {
@Test
public void givenTensorflowGraphWhenRunInSessionReturnsExpectedResult() {
Graph graph = TensorflowGraph.createGraph();
Object result = TensorflowGraph.runGraph(graph, 3.0, 6.0);
assertEquals(21.0, result);
System.out.println(result);
graph.close();
}
}