Browse Source

Update 'README.md'

天问 1 year ago
parent
commit
d970fa92e1
1 changed files with 34 additions and 63 deletions
  1. 34 63
      README.md

+ 34 - 63
README.md

@@ -1,5 +1,9 @@
 
-**TensorFlow.NET** (TF.NET) provides a .NET Standard binding for [TensorFlow](https://www.tensorflow.org/). It aims to implement the complete Tensorflow API in C# which allows .NET developers to develop, train and deploy Machine Learning models with the cross-platform .NET Standard framework. TensorFlow.NET has built-in Keras high-level interface and is released as an independent package [TensorFlow.Keras](https://www.nuget.org/packages/TensorFlow.Keras/).
+**Tensorflow.NET**是AI框架[TensorFlow](https://www.tensorflow.org/)在.NET平台上的实现,支持C#和F#,可以用来搭建深度学习模型并进行训练和推理,并内置了Numpy API,可以用来进行其它科学计算。
+
+Tensorflow.NET并非对于Python的简单封装,而是基于C API的pure C#实现,因此使用时无需额外的环境,可以很方便地用NuGet直接安装使用。并且dotnet团队提供的[ML.NET](https://github.com/dotnet/machinelearning)也依赖于Tensorflow.NET,支持调用Tensorflow.NET进行训练和推理,可以很方便地融入.NET生态。
+
+与tensorflow相同,Tensorflow.NET也内置了Keras这一高级API,只要在安装Tensorflow.NET的同时安装Tensorflow.Keras就可以使用,Keras支持以模块化的方式调用模型,给模型的搭建提供了极大的便利。
 
 [![Join the chat at https://gitter.im/publiclab/publiclab](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sci-sharp/community)
 [![Tensorflow.NET](https://ci.appveyor.com/api/projects/status/wx4td43v2d3f2xj6?svg=true)](https://ci.appveyor.com/project/Haiping-Chen/tensorflow-net)
@@ -8,66 +12,63 @@
 [![Badge](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu/#/en_US)
 [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/javiercp/BinderTF.NET/master?urlpath=lab)
 
-English | [中文](docs/README-CN.md)
+中文 | [English](https://github.com/SciSharp/TensorFlow.NET#readme)
 
-*master branch is corresponding to tensorflow v2.10, v0.6x branch is from tensorflow v2.6, v0.15-tensorflow1.15 is from tensorflow1.15.*
+*当前主分支与Tensorflow2.10版本相对应,支持Eager Mode,同时也支持v1的静态图。*
 
 
-## Why Tensorflow.NET ?
 
-`SciSharp STACK`'s mission is to bring popular data science technology into the .NET world and to provide .NET developers with a powerful Machine Learning tool set without reinventing the wheel. Since the APIs are kept as similar as possible you can immediately adapt any existing TensorFlow code in C# or F# with a zero learning curve. Take a look at a comparison picture and see how comfortably a TensorFlow/Python script translates into a C# program with TensorFlow.NET.
+## Why Tensorflow.NET?
 
-![python vs csharp](docs/assets/syntax-comparision.png)
+`SciSharp STACK`开源社区的目标是构建.NET平台下易用的科学计算库,而Tensorflow.NET就是其中最具代表性的仓库之一。在深度学习领域Python是主流,无论是初学者还是资深开发者,模型的搭建和训练都常常使用Python写就的AI框架,比如tensorflow。但在实际应用深度学习模型的时候,又可能希望用到.NET生态,亦或只是因为.NET是自己最熟悉的领域,这时候Tensorflow.NET就有显著的优点,因为它不仅可以和.NET生态很好地贴合,其API还使得开发者很容易将Python代码迁移过来。下面的对比就是很好的例子,Python代码和C#代码有着高度相似的API,这会使得迁移的时候无需做过多修改。
 
-SciSharp's philosophy allows a large number of machine learning code written in Python to be quickly migrated to .NET, enabling .NET developers to use cutting edge machine learning models and access a vast number of TensorFlow resources which would not be possible without this project.
+![python vs csharp](assets/syntax-comparision.png)
 
-In comparison to other projects, like for instance [TensorFlowSharp](https://www.nuget.org/packages/TensorFlowSharp/) which only provide TensorFlow's low-level C++ API and can only run models that were built using Python, Tensorflow.NET makes it possible to build the pipeline of training and inference with pure C# and F#. Besides, Tensorflow.NET provides binding of Tensorflow.Keras to make it easy to transfer your code from python to .NET.
+除了高度相似的API外,Tensorflow.NET与tensorflow也已经打通数据通道,tensorflow训练并保存的模型可以在Tensorflow.NET中直接读取并继续训练或推理,反之Tensorflow.NET保存的模型也可以在tensorflow中读取,这大大方便了模型的训练和部署。
 
-[ML.NET](https://github.com/dotnet/machinelearning) also take Tensorflow.NET as one of the backends to train and infer your model, which provides better integration with .NET.
+与其它类似的库比如[TensorFlowSharp](https://www.nuget.org/packages/TensorFlowSharp/)相比,Tensorflow.NET的实现更加完全,提供了更多的高级API,使用起来更为方便,更新也更加迅速。
 
-## Documention
 
-Introduction and simple examples:[Tensorflow.NET Documents](https://scisharp.github.io/tensorflow-net-docs)
+## 文档
 
-Detailed documention:[The Definitive Guide to Tensorflow.NET](https://tensorflownet.readthedocs.io/en/latest/FrontCover.html)
+基本介绍与简单用例:[Tensorflow.NET Documents](https://scisharp.github.io/tensorflow-net-docs)
 
-Examples:[TensorFlow.NET Examples](https://github.com/SciSharp/TensorFlow.NET-Examples)
+详细文档:[The Definitive Guide to Tensorflow.NET](https://tensorflownet.readthedocs.io/en/latest/FrontCover.html)
 
-Troubleshooting of running example or installation:[Tensorflow.NET FAQ](tensorflowlib/README.md)
+例程:[TensorFlow.NET Examples](https://github.com/SciSharp/TensorFlow.NET-Examples)
 
-## Usage
+运行例程常见问题:[Tensorflow.NET FAQ](tensorflowlib/README.md)
 
-### Installation
+## 安装与使用
 
-You can search the package name in NuGet Manager, or use the commands below in package manager console.
+安装可以在NuGet包管理器中搜索包名安装,也可以用下面命令行的方式。
 
-The installation contains two parts, the first is the main body:
+安装分为两个部分,第一部分是Tensorflow.NET的主体:
 
 ```sh
-### Install Tensorflow.NET
+### 安装Tensorflow.NET
 PM> Install-Package TensorFlow.NET
 
-### Install Tensorflow.Keras
+### 安装Tensorflow.Keras
 PM> Install-Package TensorFlow.Keras
 ```
 
-The second part is the computing support part. Only one of the following packages is needed, depending on your device and system.
+第二部分是计算支持部分,只需要根据自己的设备和系统选择下面之一即可:
 
 ```
-### CPU version for Windows, Linux and Mac
+### CPU版本,支持Windows、Linux和Mac
 PM> Install-Package SciSharp.TensorFlow.Redist
 
-### GPU version for Windows (CUDA and cuDNN are required)
+### Windows下的GPU版本(需要安装CUDA和cuDNN)
 PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU
 
-### GPU version for Linux (CUDA and cuDNN are required)
+### Linux下的GPU版本(需要安装CUDA和cuDNN)
 PM> Install-Package SciSharp.TensorFlow.Redist-Linux-GPU
 ```
 
+下面给出两个简单的例子,更多例子可以在[TensorFlow.NET Examples]中查看。
 
-Two simple examples are given here to introduce the basic usage of Tensorflow.NET. As you can see, it's easy to write C# code just like that in Python.
-
-### Example - Linear Regression in `Eager` mode
+### 简单例子(使用Eager Mode进行线性回归)
 
 ```csharp
 using static Tensorflow.Binding;
@@ -118,9 +119,9 @@ foreach (var step in range(1, training_steps + 1))
 }
 ```
 
-Run this example in [Jupyter Notebook](https://github.com/SciSharp/SciSharpCube).
+这一用例也可以在[Jupyter Notebook Example](https://github.com/SciSharp/SciSharpCube)进行运行.
 
-### Example - Toy version of `ResNet` in `Keras` functional API
+### 简单例子(使用Keras搭建Resnet)
 
 ```csharp
 using static Tensorflow.Binding;
@@ -167,11 +168,9 @@ model.fit(x_train[new Slice(0, 2000)], y_train[new Slice(0, 2000)],
 model.save("./toy_resnet_model");
 ```
 
-The F# example for linear regression is available [here](docs/Example-fsharp.md).
-
-More adcanced examples could be found in [TensorFlow.NET Examples](https://github.com/SciSharp/TensorFlow.NET-Examples).
+此外,Tensorflow.NET也支持用F#搭建上述模型进行训练和推理。
 
-## Version Relationships
+## Tensorflow.NET版本对应关系
 
 | TensorFlow.NET Versions                 | tensorflow 1.14, cuda 10.0 | tensorflow 1.15, cuda 10.0 | tensorflow 2.3, cuda 10.1 | tensorflow 2.4, cuda 11 | tensorflow 2.7, cuda 11 |tensorflow 2.10, cuda 11 |
 | -------------------------- | ------------- | -------------- | ------------- | ------------- | ------------ | ------------ |
@@ -192,34 +191,6 @@ tf.net 0.10x -> tf native 2.10
 ...
 ```
 
-## Contribution:
-
-Feel like contributing to one of the hottest projects in the Machine Learning field? Want to know how Tensorflow magically creates the computational graph? 
-
-We appreciate every contribution however small! There are tasks for novices to experts alike, if everyone tackles only a small task the sum of contributions will be huge.
-
-You can:
-- Star Tensorflow.NET or share it with others
-- Tell us about the missing APIs compared to Tensorflow
-- Port Tensorflow unit tests from Python to C# or F#
-- Port Tensorflow examples to C# or F# and raise issues if you come accross missing parts of the API or BUG
-- Debug one of the unit tests that is marked as Ignored to get it to work
-- Debug one of the not yet working examples and get it to work
-- Help us to complete the documentions.
+如果使用过程中发现有缺失的版本,请告知我们,谢谢!
 
-
-#### How to debug unit tests:
-
-The best way to find out why a unit test is failing is to single step it in C# or F# and its corresponding Python at the same time to see where the flow of execution digresses or where variables exhibit different values. Good Python IDEs like PyCharm let you single step into the tensorflow library code. 
-
-#### Git Knowhow for Contributors
-
-Add SciSharp/TensorFlow.NET as upstream to your local repo ...
-```git
-git remote add upstream git@github.com:SciSharp/TensorFlow.NET.git
-```
-
-Please make sure you keep your fork up to date by regularly pulling from upstream. 
-```git
-git pull upstream master
-```
+请注意Tensorflow.NET与Tensorflow.Keras版本存在一一对应关系,请安装与Tensorflow.NET对应的Tensorflow.Keras版本。