diff --git a/README.md b/README.md
index 99afcc93..e740b0ed 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@ TensorFlow.NET provides .NET Standard binding for [TensorFlow](https://www.tenso
[](https://ci.appveyor.com/project/Haiping-Chen/tensorflow-net)
[](https://codecov.io/gh/SciSharp/NumSharp)
[](https://www.nuget.org/packages/TensorFlow.NET)
+[](https://tensorflownet.readthedocs.io/en/latest/?badge=latest)
TensorFlow.NET is a member project of [SciSharp](https://github.com/SciSharp) stack.
@@ -54,4 +55,6 @@ using(var sess = tf.Session())
}
```
-Star me or raise issue on [Github](https://github.com/SciSharp/TensorFlow.NET) feel free.
+Read the docs & book [The Definitive Guide to Tensorflow.NET](https://tensorflownet.readthedocs.io/en/latest/FrontCover.html).
+
+Star me or raise issue on [Github](https://github.com/SciSharp/TensorFlow.NET) feel free.
\ No newline at end of file
diff --git a/docs/README.md b/docs/README.md
index e69de29b..0d3fa1ed 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -0,0 +1,16 @@
+### Instll Sphinx
+```cmd
+pip install sphinx
+pip install recommonmark
+pip install sphinx_rtd_theme
+```
+
+### Init the docs
+```cmd
+sphinx-quickstarts
+```
+
+### Build the docs
+```cmd
+make html
+```
\ No newline at end of file
diff --git a/docs/source/FrontCover.md b/docs/source/FrontCover.md
index dd3dcb58..e1eacc28 100644
--- a/docs/source/FrontCover.md
+++ b/docs/source/FrontCover.md
@@ -9,7 +9,11 @@
-
+
+
+
+
+
@@ -19,9 +23,13 @@
#### An Open Source Machine Learning Framework for Everyone
-### 谷歌TensorFlow的C#封装库
+### 谷歌TensorFlow的C#绑定库
+
+#### 人人都可用的开源机器学习框架。
+
+
+
-#### 开源机器学习框架。
@@ -30,13 +38,14 @@
-Haiping Chen & Christian Kahr
-Christmas, 2018
-陈海平 & 克里斯汀 卡尔
-2018年圣诞节
+Haiping Chen & Christian Kahr
+Christmas, 2018
+陈海平 & 克里斯汀·卡尔
+2018年圣诞节
+
diff --git a/docs/source/HelloWorld.md b/docs/source/HelloWorld.md
index 2704b8b7..9d7c818b 100644
--- a/docs/source/HelloWorld.md
+++ b/docs/source/HelloWorld.md
@@ -1,14 +1,70 @@
-# Get started with TensorFlow.NET
+# Get started with TensorFlow.NET
-让我们先运行一个经典的HelloWorld程序,看看TensorFlow是在.NET上面运行的效果,我想不出有比做个HelloWorld再简单的方式了。
+让我们先运行一个经典的HelloWorld程序,看看TensorFlow在.NET上面运行的效果,我想不出有比做个HelloWorld更简单的方式了。
Let's run a classic HelloWorld program first and see if TensorFlow is running on .NET. I can't think of a simpler way to be a HelloWorld.
-### Install the TensorFlow.NET SDK
+### Install the TensorFlow.NET SDK 安装开发环境
+
+TensorFlow.NET uses the .NET Standard 2.0 standard, so your new project Target Framework can be .NET Framework or .NET Core. All the examples in this book are using .NET Core 2.2 and Microsoft Visual Studio Community 2017. To start building TensorFlow program you just need to download and install the .NET SDK (Software Development Kit). You have to download the latest .NET Core SDK from offical website: https://dotnet.microsoft.com/download.
+
+TensorFlow.NET采用.NET标准库2.0版本,因此你的新建工程可以是.NET Framework或者是基于.NET Core的。本文中的所有例子都是用的.NET Core 2.2的,IDE用的是Microsoft Visual Studio Community 2017。为了能编译和运行TensorFlow工程,你需要从这里下载最新的.NET Core SDK: https://dotnet.microsoft.com/download。
+
+1. New a project
+
+ 
+
+2. Choose Console App (.NET Core)
+
+ 
+
-To start building TensorFlow program you just need to download and install the .NET SDK (Software Development Kit).
```cmd
PM> Install-Package TensorFlow.NET
```
+### Start coding Hello World 开始编写Hello World
+
+After installing the TensorFlow.NET package, you can use the `using Tensorflow` to introduce the TensorFlow library.
+
+安装完TensorFlow.NET包后,你就可以使用`using Tensorflow`来引入TensorFlow库了。
+
+```csharp
+using System;
+using Tensorflow;
+
+namespace TensorFlowNET.Examples
+{
+ ///
+ /// Simple hello world using TensorFlow
+ ///
+ public class HelloWorld : IExample
+ {
+ public void Run()
+ {
+ /* Create a Constant op
+ The op is added as a node to the default graph.
+
+ The value returned by the constructor represents the output
+ of the Constant op. */
+ var hello = tf.constant("Hello, TensorFlow!");
+
+ // Start tf session
+ using (var sess = tf.Session())
+ {
+ // Run the op
+ var result = sess.run(hello);
+ Console.WriteLine(result);
+ }
+ }
+ }
+}
+```
+After CTRL + F5 run, you will get the output.
+```cmd
+2019-01-05 10:53:42.145931: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
+Hello, TensorFlow!
+Press any key to continue . . .
+```
+
diff --git a/docs/source/_static/Cover.jpg b/docs/source/_static/front-cover.jpg
similarity index 100%
rename from docs/source/_static/Cover.jpg
rename to docs/source/_static/front-cover.jpg
diff --git a/docs/source/_static/new-project-console.png b/docs/source/_static/new-project-console.png
new file mode 100644
index 00000000..d4bfbc68
Binary files /dev/null and b/docs/source/_static/new-project-console.png differ
diff --git a/docs/source/_static/new-project.png b/docs/source/_static/new-project.png
new file mode 100644
index 00000000..789b5f1f
Binary files /dev/null and b/docs/source/_static/new-project.png differ
diff --git a/docs/source/index.rst b/docs/source/index.rst
index fe256a88..dc20416c 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -25,4 +25,5 @@ Indices and tables
:maxdepth: 3
:caption: Get Started with TensorFlow.NET:
- FrontCover
\ No newline at end of file
+ FrontCover
+ HelloWorld
\ No newline at end of file
diff --git a/test/TensorFlowNET.Examples/HelloWorld.cs b/test/TensorFlowNET.Examples/HelloWorld.cs
index 290abc45..bfa4c4d5 100644
--- a/test/TensorFlowNET.Examples/HelloWorld.cs
+++ b/test/TensorFlowNET.Examples/HelloWorld.cs
@@ -13,18 +13,20 @@ namespace TensorFlowNET.Examples
{
public void Run()
{
- /* # Create a Constant op
- The op is added as a node to the default graph.
+ /* Create a Constant op
+ The op is added as a node to the default graph.
- The value returned by the constructor represents the output
- of the Constant op.*/
+ The value returned by the constructor represents the output
+ of the Constant op. */
var hello = tf.constant("Hello, TensorFlow!");
// Start tf session
- var sess = tf.Session();
-
- // Run the op
- Console.WriteLine(sess.run(hello));
+ using (var sess = tf.Session())
+ {
+ // Run the op
+ var result = sess.run(hello);
+ Console.WriteLine(result);
+ }
}
}
}
diff --git a/test/TensorFlowNET.Examples/Program.cs b/test/TensorFlowNET.Examples/Program.cs
index 6f5f8744..9bbcd376 100644
--- a/test/TensorFlowNET.Examples/Program.cs
+++ b/test/TensorFlowNET.Examples/Program.cs
@@ -20,11 +20,8 @@ namespace TensorFlowNET.Examples
catch (Exception ex)
{
Console.WriteLine(ex);
- Console.ReadLine();
}
}
-
- Console.ReadLine();
}
}
}