Adding source code for the tutorial tracked under BAEL-2759 (#6533)
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
b3fc27088b
commit
dc72b8b397
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user