diff --git a/test/TensorFlowNET.Examples/NeuralNetXor.cs b/test/TensorFlowNET.Examples/NeuralNetXor.cs index 42911aad..f4ea3b54 100644 --- a/test/TensorFlowNET.Examples/NeuralNetXor.cs +++ b/test/TensorFlowNET.Examples/NeuralNetXor.cs @@ -58,7 +58,8 @@ namespace TensorFlowNET.Examples // Start tf session with(tf.Session(graph), sess => { - init.run(); + // init.run() + sess.run(init); var step = 0; //TODO: make the type conversion and jagged array initializer work with numpy //var xy = np.array(new bool[,] @@ -90,9 +91,9 @@ namespace TensorFlowNET.Examples loss_value = sess.run(loss, new FeedItem(features, xy), new FeedItem(labels, y_)); step++; if (step%1000==0) - Console.WriteLine($"Step {0} loss: {loss_value[0]}"); + Console.WriteLine($"Step {step} loss: {loss_value}"); } - Console.WriteLine($"Final loss: {loss_value[0]}"); + Console.WriteLine($"Final loss: {loss_value}"); }); return true; } diff --git a/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs b/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs index e0174c56..d58da040 100644 --- a/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs +++ b/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs @@ -109,7 +109,7 @@ namespace TensorFlowNET.ExamplesTests new TextClassificationWithMovieReviews() { Enabled = true }.Run(); } - [Ignore("Attempting to use uninitialized value Variable_1")] + //[Ignore("Attempting to use uninitialized value Variable_1")] [TestMethod] public void NeuralNetXor() {