Skip to content

Commit 07e77e1

Browse files
committed
update README
1 parent 8d47f40 commit 07e77e1

8 files changed

Lines changed: 33 additions & 12 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ TensorFlow.NET is a member project of [SciSharp STACK](https://github.com/SciSha
1111

1212
![tensors_flowing](docs/assets/tensors_flowing.gif)
1313

14+
### Why should we use TensorFlow.NET ?
15+
16+
`SciSharp STASK`'s mission is to create a zero learning curve on the .NET based technology stack Machine Learning tool library. Let's take a look at a comparison picture and you can see why TensorFlow.NET is the tool that is the most comfortable for you.
17+
18+
![pythn vs csharp](docs/assets/syntax-comparision.png)
19+
20+
SciSharp's philosophy allows a large number of machine learning code written in python to be quickly migrated to .NET, allowing a large number of .NET Developers to use more updated models.
21+
1422
### How to use
23+
1524
Install TensorFlow.NET through NuGet.
1625
```sh
1726
PM> Install-Package TensorFlow.NET

docs/assets/syntax-comparision.png

126 KB
Loading

docs/source/Attribute.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/source/NameScope.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/source/Operation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Chapter. Operation
22

3+
`Operation` represents a `Graph` node that performs computation on tensors. An operation is a `Node` in a `Graph` that takes zero or more `Tensor`s (produced by other Operations in the Graph) as input, and produces zero or more Tensors as output.

docs/source/Preface.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@ TensorFlow是一个用于机器学习的开源项目,尤其适用于深度学
1818

1919
In order to avoid confusion, the unique classes defined in TensorFlow are not translated in this book. For example, Tensor, Graph, Shape will retain the English name.
2020

21-
为了避免混淆,本书中对TensorFlow中定义的特有类不进行翻译,比如Tensor, Graph, Shape这些词都会保留英文名称。
21+
为了避免混淆,本书中对TensorFlow中定义的特有类不进行翻译,比如Tensor, Graph, Session, Shape这些词都会保留英文名称。
2222

2323

2424

25-
Terminology:
25+
Terminology 术语:
2626

2727
TF: Google TensorFlow
2828

29-
TF.NET: TensorFlow.NET
29+
TF.NET: TensorFlow.NET
30+
31+
Graph: 计算图
32+
33+
Session: 会话
34+
35+
Variable: 变量
36+
37+
Tensor: 张量
38+
39+
Operation: 操作
40+
41+
Node: 节点

docs/source/Session.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
TensorFlow **session** runs parts of the graph across a set of local and remote devices. A session allows to execute graphs or part of graphs. It allocates resources (on one or more machines) for that and holds the actual values of intermediate results and variables.
44

5+
TensorFlow **Session** 运行预定义的计算图,并且支持跨设备运行和分配GPU。Session可以运行整个计算图或者图的一部分,这样做的好处是对开发模型来话很方便,不需要每次都执行整个图。会话还负责当前计算图的内存分配,保留和传递中间结果。
6+
57
### Running Computations in a Session
68

7-
Let's complete the example in last chapter.
9+
Let's complete the example in last chapter. To run any of the operations, we need to create a session for that graph. The session will also allocate memory to store the current value of the variable.
10+
11+
让我们完成上一章的例子,在那个例子里我们只是定义了一个图的结构。为了运行这个图,我们需要创建一个Session来根据图定义来分配资源运行它。
812

913
```csharp
1014
with<Graph>(tf.Graph(), graph =>
@@ -22,3 +26,6 @@ with<Graph>(tf.Graph(), graph =>
2226
});
2327
```
2428

29+
The value of our variables is only valid within one session. If we try to get the value in another session. TensorFlow will raise an error of `Attempting to use uninitialized value foo`. Of course, we can use the graph in more than one session, because session copies graph definition to new memory area. We just have to initialize the variables again. The values in the new session will be completely independent from the previous one.
30+
31+
变量值只会在一个Session里有效。如果我们试图从本Session来访问另一个Session创建的变量和值,就会得到一个`变量未初始化`的错误提示。当然,我们能从多个Session运行同一个计算图,因为计算图只是一个定义,Session初始化的时候会复制整图的定义到新的内存空间里。所以每个Session里的变量值是互相隔离的。

docs/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Welcome to TensorFlow.NET's documentation!
2222
Graph
2323
Session
2424
Operation
25-
Attribute
26-
NameScope
2725
ControlDependency
2826
Gradient
2927
Train

0 commit comments

Comments
 (0)