Skip to content

Commit 5b82356

Browse files
committed
released 0.1.0 and updated doc.
1 parent c56e2c8 commit 5b82356

File tree

10 files changed

+71
-32
lines changed

10 files changed

+71
-32
lines changed

docs/source/Constant.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Chapter. Constant
2+

docs/source/Foreword.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Foreword 前言
1+
# Foreword
22

3-
One of the most nerve-wracking periods when releasing the first version of an open source project occurs when the gitter community is created. You are all alone, eagerly hoping and wishing for the first user to come along. I still vividly remember those days.
3+
One of the most nerve-wracking periods when releasing the first version of an open source project occurs when the [gitter](https://gitter.im/sci-sharp/community) community is created. You are all alone, eagerly hoping and wishing for the first user to come along. I still vividly remember those days.
44

5+
最让人紧张的时刻是当我为自己的开源项目发布第一个版本并在gitter里开放一个聊天社区,而里面只有你一个人,饥渴地期待第一个进入聊天室的用户,我仍然清楚地记得那个时期。
56

67

7-
当我开始写这个项目的时候,我同时也在整理编码过程时候的想法,Tensorflow是个巨大最复杂的工程,很容易超出个人能力范围,所以想尽可能地把当时的思路记录下来,也想趁着记录整理的过程把思路理清。
88

9-
When I started writing this project, I was also sorting out the idea of the coding process. Tensorflow is a huge and complicated project, and it is easy to go beyond the scope of personal ability. Therefore, I want to record the thoughts at the time as much as possible. The process of recording and sorting clears the way of thinking.
9+
TensorFlow.NET is my third open source project. BotSharp and NumSharp are the first two. The response is pretty good. I also got a lot of stars on github. Although the first two projects are very difficult, I can't admit that TensorFlow.NET is much more difficult than the previous two, and it is an area I have never been involved with. Mainly related to GPU parallel computing, distributed computing and neural network model. When I started writing this project, I was also sorting out the idea of the coding process. TensorFlow is a huge and complicated project, and it is easy to go beyond the scope of personal ability. Therefore, I want to record the thoughts at the time as much as possible. The process of recording and sorting clears the way of thinking.
10+
11+
TensorFlow.NET是我写的第3个开源项目,BotSharp和NumSharp是前两个,反应都还不错,在github上也收获了不少星。虽然前两个项目的难度很大,但是我不得承认TensorFlow.NET的难度要比之前两个要大的多,是我从未涉入过的领域。主要涉及GPU并行计算,分布式计算和神经网络模型。当我开始写这个项目的时候,我同时也在整理编码过程时候的想法,TensorFlow是个巨大最复杂的工程,很容易超出个人能力范围,所以想尽可能地把当时的思路记录下来,也想趁着记录整理的过程把思路理清。
12+
13+
14+
15+
All the examples in this book can be found in the github repository of TensorFlow.NET. When the source code and the code in the book are inconsistent, please refer to the source code. The sample code is typically located in the Example or UnitTest project.
16+
17+
本书中的所有例子都可以在TensorFlow.NET的github仓库中找到,当源代码和书中的代码不一致时,请以源代码为准。示例代码一般都位于Example或者是UnitTest项目里。

docs/source/FrontCover.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The Definitive Guide to TensorFlow.NET
2-
# TensorFlow.NET 权威指南
2+
33

44

55

@@ -23,9 +23,7 @@
2323

2424
#### An Open Source Machine Learning Framework for Everyone
2525

26-
### 谷歌TensorFlow的C#绑定库
27-
28-
#### 人人都可用的开源机器学习框架。
26+
####
2927

3028

3129

@@ -40,12 +38,11 @@
4038
<p style='float:right;'>
4139
<b>Haiping Chen & Christian Kahr</b><br/>
4240
<b>Christmas, 2018</b><br/>
43-
<b>陈海平 & 克里斯汀·卡尔</b><br/>
44-
<b>2018年圣诞节</b>
4541
</p>
4642

4743

4844

4945

5046

5147

48+

docs/source/HelloWorld.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Get started with TensorFlow.NET
22

3-
让我们先运行一个经典的HelloWorld程序,看看TensorFlow在.NET上面运行的效果,我想不出有比做个HelloWorld更简单的方式了。
3+
I would describe TensorFlow as an open source machine learning framework developed by Google which can be used to build neural networks and perform a variety of machine learning tasks. it works on data flow graph where nodes are the mathematical operations and the edges are the data in the form of tensor, hence the name Tensor-Flow.
4+
5+
按照我的理解,TensorFlow是Google公司开发的一个开源机器学习框架,可以用来搭建神经网络模型和其它传统机器学习模型,它采用了图计算模型,图的节点和边分别代表了操作和数据输入或输出,数据在图的单个方向传递,因此这个过程形象地取名叫做TensorFlow。
46

57
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.
68

7-
### Install the TensorFlow.NET SDK 安装开发环境
9+
让我们先运行一个经典的HelloWorld程序,看看TensorFlow在.NET上面运行的效果,我想不出有比做个HelloWorld更简单的方式了。
10+
11+
12+
13+
### Install the TensorFlow.NET SDK
814

915
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.
1016

@@ -24,7 +30,7 @@ TensorFlow.NET采用.NET标准库2.0版本,因此你的新建工程可以是.N
2430
PM> Install-Package TensorFlow.NET
2531
```
2632

27-
### Start coding Hello World 开始编写Hello World
33+
### Start coding Hello World
2834

2935
After installing the TensorFlow.NET package, you can use the `using Tensorflow` to introduce the TensorFlow library.
3036

@@ -68,3 +74,7 @@ Hello, TensorFlow!
6874
Press any key to continue . . .
6975
```
7076

77+
This sample code can be found at [here](https://github.com/SciSharp/TensorFlow.NET/blob/master/test/TensorFlowNET.Examples/HelloWorld.cs).
78+
79+
此示例代码可以在[这里](https://github.com/SciSharp/TensorFlow.NET/blob/master/test/TensorFlowNET.Examples/HelloWorld.cs)找到。
80+

docs/source/Preface.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
# Preface
3+
# Preface
44

55

66

@@ -32,4 +32,4 @@ TensorFlow is an open source project for machine learning especially for deep le
3232

3333
TF: Google TensorFlow
3434

35-
TF.NET: Tensorflow.NET
35+
TF.NET: TensorFlow.NET

docs/source/Tensor.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,53 @@
1-
# Chapter 1. Tensor 第一章: Tensor
1+
# Chapter. Tensor
22

33
### Represents one of the outputs of an Operation
44

5-
### 表示一个操作的输出
6-
75

86

97
##### What is Tensor?
108

11-
##### Tensor 是什么?
12-
13-
Tensor holds a multi-dimensional array of elements of a single data type which is very similar with numpy's ndarray.
9+
Tensor holds a multi-dimensional array of elements of a single data type which is very similar with numpy's ndarray. When the dimension is zero, it can be called a scalar. When the dimension is 2, it can be called a matrix. When the dimension is greater than 2, it is usually called a tensor. If you are very familiar with numpy, then understanding Tensor will be quite easy.
1410

15-
Tensor是一个具有单一数据类型的多维数组容器,非常类似于numpy里的ndarray。如果你对numpy非常熟悉的话,那么对Tensor的理解会相当容易。
11+
Tensor是一个具有单一数据类型的多维数组容器,当维度为零时,可以称之为标量,当维度为2时,可以称之为矩阵,当维度大于2时,通常称之为张量。Tensor的数据结构非常类似于numpy里的ndarray。如果你对numpy非常熟悉的话,那么对Tensor的理解会相当容易。
1612

1713

1814

1915
##### How to create a Tensor?
2016

21-
##### 如何创建一个Tensor?
17+
There are many ways to initialize a Tensor object in TF.NET. It can be initialized from a scalar, string, matrix or tensor.
18+
19+
在TF.NET中有很多种方式可以初始化一个Tensor对象。它可以从一个标量,字符串,矩阵或张量来初始化。
20+
21+
```csharp
22+
// Create a tensor holds a scalar value
23+
var t1 = new Tensor(3);
24+
25+
// Init from a string
26+
var t2 = new Tensor("Hello! TensorFlow.NET");
27+
28+
// Tensor holds a ndarray
29+
var nd = new NDArray(new int[]{3, 1, 1, 2});
30+
var t3 = new Tensor(nd);
31+
32+
Console.WriteLine($"t1: {t1}, t2: {t2}, t3: {t3}");
33+
```
34+
35+
36+
37+
##### Data Structure of Tensor
2238

2339

2440

2541

2642

27-
TF uses column major order.
43+
TF uses column major order. If we use NumSharp to generate a 2 x 3 matrix, if we access the data from 0 to 5 in order, we won't get a number of 1-6, but we get the order of 1, 4, 2, 5, 3, 6. a set of numbers.
2844

2945
TF 采用的是按列存储模式,如果我们用NumSharp产生一个2 X 3的矩阵,如果按顺序从0到5访问数据的话,是不会得到1-6的数字的,而是得到1,4, 2, 5, 3, 6这个顺序的一组数字。
3046

3147
```cs
32-
// generate a matrix:[[1, 2, 3], [4, 5, 6]]
48+
// Generate a matrix:[[1, 2, 3], [4, 5, 6]]
3349
var nd = np.array(1f, 2f, 3f, 4f, 5f, 6f).reshape(2, 3);
34-
// the index will be 0 2 4 1 3 5, it's column-major order.
50+
// The index will be 0 2 4 1 3 5, it's column-major order.
3551
```
3652

3753

docs/source/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ Indices and tables
2727
Foreword
2828
Preface
2929
HelloWorld
30-
Tensor
30+
Tensor
31+
Constant
32+
Variable
33+
Operation
34+
Graph
35+
Session

src/TensorFlowNET.Core/TensorFlowNET.Core.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<AssemblyName>TensorFlow.NET</AssemblyName>
66
<RootNamespace>Tensorflow</RootNamespace>
7-
<Version>0.0.3</Version>
7+
<Version>0.1.0</Version>
88
<Authors>Haiping Chen</Authors>
99
<Company>SciSharp STACK</Company>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -16,8 +16,9 @@
1616
<PackageTags>TensorFlow, NumSharp, SciSharp, MachineLearning, TensorFlow.NET</PackageTags>
1717
<Description>Google's TensorFlow binding in .NET Standard.
1818
Docs: https://tensorflownet.readthedocs.io</Description>
19-
<AssemblyVersion>0.0.3.0</AssemblyVersion>
20-
<PackageReleaseNotes>API updated</PackageReleaseNotes>
19+
<AssemblyVersion>0.1.0.0</AssemblyVersion>
20+
<PackageReleaseNotes>Implemented the tf.Variable().
21+
TensorFlow 1.13 RC.</PackageReleaseNotes>
2122
<LangVersion>7.2</LangVersion>
2223
</PropertyGroup>
2324

test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="NumSharp" Version="0.6.6" />
10-
<PackageReference Include="TensorFlow.NET" Version="0.0.3" />
10+
<PackageReference Include="TensorFlow.NET" Version="0.1.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

test/TensorFlowNET.UnitTest/TensorFlowNET.UnitTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
2121
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
2222
<PackageReference Include="NumSharp" Version="0.6.6" />
23-
<PackageReference Include="TensorFlow.NET" Version="0.0.3" />
23+
<PackageReference Include="TensorFlow.NET" Version="0.1.0" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

0 commit comments

Comments
 (0)