diff --git a/test/TensorFlowNET.Examples/NeuralNetXor.cs b/test/TensorFlowNET.Examples/NeuralNetXor.cs index 15785115..a2dce69b 100644 --- a/test/TensorFlowNET.Examples/NeuralNetXor.cs +++ b/test/TensorFlowNET.Examples/NeuralNetXor.cs @@ -16,7 +16,7 @@ namespace TensorFlowNET.Examples public int Priority => 10; public bool Enabled { get; set; } = true; public string Name => "NN XOR"; - public bool ImportGraph { get; set; } = false; + public bool ImportGraph { get; set; } = true; public int num_steps = 5000; @@ -57,7 +57,7 @@ namespace TensorFlowNET.Examples else loss_value=RunWithBuiltGraph(); - return loss_value < 0.0627; + return loss_value < 0.0628; } private float RunWithImportedGraph() diff --git a/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs b/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs index c0b4eb1f..b134fbde 100644 --- a/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs +++ b/test/TensorFlowNET.UnitTest/ExamplesTests/ExamplesTest.cs @@ -40,12 +40,11 @@ namespace TensorFlowNET.ExamplesTests new InceptionArchGoogLeNet() { Enabled = true }.Run(); } - [Ignore] [TestMethod] public void KMeansClustering() { tf.Graph().as_default(); - new KMeansClustering() { Enabled = true, train_size = 500, validation_size = 100, test_size = 100, batch_size =100 }.Run(); + new KMeansClustering() { Enabled = true, ImportGraph = true, train_size = 500, validation_size = 100, test_size = 100, batch_size =100 }.Run(); } [TestMethod] @@ -109,15 +108,20 @@ namespace TensorFlowNET.ExamplesTests new TextClassificationWithMovieReviews() { Enabled = true }.Run(); } - [Ignore("Loss function optimization is not working yet")] [TestMethod] public void NeuralNetXor() { tf.Graph().as_default(); - Assert.IsTrue(new NeuralNetXor() { Enabled = true }.Run()); + Assert.IsTrue(new NeuralNetXor() { Enabled = true, ImportGraph = false }.Run()); + } + + [TestMethod] + public void NeuralNetXor_ImportedGraph() + { + tf.Graph().as_default(); + Assert.IsTrue(new NeuralNetXor() { Enabled = true, ImportGraph = true }.Run()); } - } }