diff --git a/test/TensorFlowNET.Examples/HelloWorld.cs b/test/TensorFlowNET.Examples/HelloWorld.cs index 1c57d5ca..26dab3be 100644 --- a/test/TensorFlowNET.Examples/HelloWorld.cs +++ b/test/TensorFlowNET.Examples/HelloWorld.cs @@ -18,7 +18,8 @@ namespace TensorFlowNET.Examples The value returned by the constructor represents the output of the Constant op. */ - var hello = tf.constant("Hello, TensorFlow!"); + var str = "Hello, TensorFlow!"; + var hello = tf.constant(str); // Start tf session using (var sess = tf.Session()) @@ -26,9 +27,9 @@ namespace TensorFlowNET.Examples // Run the op var result = sess.run(hello); Console.WriteLine(result.ToString()); - if(!result.ToString().Equals("Hello, TensorFlow!")) + if(!result.ToString().Equals(str)) { - throw new ValueError("HelloWorld"); + throw new ValueError("HelloWorld example acts in unexpected way."); } } } diff --git a/test/TensorFlowNET.Examples/IExample.cs b/test/TensorFlowNET.Examples/IExample.cs index 8908abe0..31dd3669 100644 --- a/test/TensorFlowNET.Examples/IExample.cs +++ b/test/TensorFlowNET.Examples/IExample.cs @@ -4,6 +4,10 @@ using System.Text; namespace TensorFlowNET.Examples { + /// + /// Interface of Example project + /// All example should implement IExample so the entry program will find it. + /// public interface IExample { void Run();