| @@ -9,7 +9,7 @@ | |||||
| [](https://996.icu/#/en_US) | [](https://996.icu/#/en_US) | ||||
| [](https://mybinder.org/v2/gh/javiercp/BinderTF.NET/master?urlpath=lab) | [](https://mybinder.org/v2/gh/javiercp/BinderTF.NET/master?urlpath=lab) | ||||
| English | [中文](docs/Readme-CN.md) | |||||
| English | [中文](docs/README-CN.md) | |||||
| *master branch is corresponding to tensorflow v2.10, v0.6x branch is from tensorflow v2.6, v0.15-tensorflow1.15 is from tensorflow1.15.* | *master branch is corresponding to tensorflow v2.10, v0.6x branch is from tensorflow v2.6, v0.15-tensorflow1.15 is from tensorflow1.15.* | ||||
| @@ -20,13 +20,13 @@ English | [中文](docs/Readme-CN.md) | |||||
| `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. | `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. | ||||
|  | |||||
|  | |||||
| 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. | 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. | ||||
| 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. | 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. | ||||
| [ML.NET](https://github.com/dotnet/machinelearning) also support using tensorflow as backend to train and infer your model, which provides better integration with .NET. | |||||
| [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. | |||||
| ## Documention | ## Documention | ||||
| @@ -42,7 +42,7 @@ Troubleshooting of running example or installation:[Tensorflow.NET FAQ](tensor | |||||
| ### Installation | ### Installation | ||||
| You can search the package name in NuGet Manager, or use the commands below in pckage manager console. | |||||
| You can search the package name in NuGet Manager, or use the commands below in package manager console. | |||||
| The installation contains two parts, the first is the main body: | The installation contains two parts, the first is the main body: | ||||
| @@ -57,13 +57,13 @@ 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. | 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 version for Windows, Linux and Mac | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist | PM> Install-Package SciSharp.TensorFlow.Redist | ||||
| ### Gpu version for Windows (CUDA and CUDNN are required) | |||||
| ### GPU version for Windows (CUDA and cuDNN are required) | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU | PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU | ||||
| ### Gpu version for Linux (CUDA and CUDNN are required) | |||||
| ### GPU version for Linux (CUDA and cuDNN are required) | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist-Linux-GPU | PM> Install-Package SciSharp.TensorFlow.Redist-Linux-GPU | ||||
| ``` | ``` | ||||
| @@ -24,7 +24,7 @@ Tensorflow.NET并非对于Python的简单封装,而是基于C API的pure C#实 | |||||
| `SciSharp STACK`开源社区的目标是构建.NET平台下易用的科学计算库,而Tensorflow.NET就是其中最具代表性的仓库之一。在深度学习领域Python是主流,无论是初学者还是资深开发者,模型的搭建和训练都常常使用Python写就的AI框架,比如tensorflow。但在实际应用深度学习模型的时候,又可能希望用到.NET生态,亦或只是因为.NET是自己最熟悉的领域,这时候Tensorflow.NET就有显著的优点,因为它不仅可以和.NET生态很好地贴合,其API还使得开发者很容易将Python代码迁移过来。下面的对比就是很好的例子,Python代码和C#代码有着高度相似的API,这会使得迁移的时候无需做过多修改。 | `SciSharp STACK`开源社区的目标是构建.NET平台下易用的科学计算库,而Tensorflow.NET就是其中最具代表性的仓库之一。在深度学习领域Python是主流,无论是初学者还是资深开发者,模型的搭建和训练都常常使用Python写就的AI框架,比如tensorflow。但在实际应用深度学习模型的时候,又可能希望用到.NET生态,亦或只是因为.NET是自己最熟悉的领域,这时候Tensorflow.NET就有显著的优点,因为它不仅可以和.NET生态很好地贴合,其API还使得开发者很容易将Python代码迁移过来。下面的对比就是很好的例子,Python代码和C#代码有着高度相似的API,这会使得迁移的时候无需做过多修改。 | ||||
|  | |||||
|  | |||||
| 除了高度相似的API外,Tensorflow.NET与tensorflow也已经打通数据通道,tensorflow训练并保存的模型可以在Tensorflow.NET中直接读取并继续训练或推理,反之Tensorflow.NET保存的模型也可以在tensorflow中读取,这大大方便了模型的训练和部署。 | 除了高度相似的API外,Tensorflow.NET与tensorflow也已经打通数据通道,tensorflow训练并保存的模型可以在Tensorflow.NET中直接读取并继续训练或推理,反之Tensorflow.NET保存的模型也可以在tensorflow中读取,这大大方便了模型的训练和部署。 | ||||
| @@ -50,6 +50,7 @@ Tensorflow.NET并非对于Python的简单封装,而是基于C API的pure C#实 | |||||
| ```sh | ```sh | ||||
| ### 安装Tensorflow.NET | ### 安装Tensorflow.NET | ||||
| PM> Install-Package TensorFlow.NET | PM> Install-Package TensorFlow.NET | ||||
| ### 安装Tensorflow.Keras | ### 安装Tensorflow.Keras | ||||
| PM> Install-Package TensorFlow.Keras | PM> Install-Package TensorFlow.Keras | ||||
| ``` | ``` | ||||
| @@ -57,13 +58,13 @@ PM> Install-Package TensorFlow.Keras | |||||
| 第二部分是计算支持部分,只需要根据自己的设备和系统选择下面之一即可: | 第二部分是计算支持部分,只需要根据自己的设备和系统选择下面之一即可: | ||||
| ``` | ``` | ||||
| ### CPU版本 | |||||
| ### CPU版本,支持Windows、Linux和Mac | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist | PM> Install-Package SciSharp.TensorFlow.Redist | ||||
| ### Windows下的GPU版本(需要安装CUDA和CUDNN) | |||||
| ### Windows下的GPU版本(需要安装CUDA和cuDNN) | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU | PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU | ||||
| ### Linux下的GPU版本(需要安装CUDA和CUDNN) | |||||
| ### Linux下的GPU版本(需要安装CUDA和cuDNN) | |||||
| PM> Install-Package SciSharp.TensorFlow.Redist-Linux-GPU | PM> Install-Package SciSharp.TensorFlow.Redist-Linux-GPU | ||||
| ``` | ``` | ||||
| @@ -173,14 +174,24 @@ model.save("./toy_resnet_model"); | |||||
| ## Tensorflow.NET版本对应关系 | ## 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.10, cuda 11 | | |||||
| | -------------------------- | ------------- | -------------- | ------------- | ------------- | ------------ | | |||||
| | tf.net 0.7+, tf.keras 0.7+ | | | | | x | | |||||
| | tf.net 0.4x, tf.keras 0.5 | | | | x | | | |||||
| | tf.net 0.3x, tf.keras 0.4 | | | x | | | | |||||
| | tf.net 0.2x | | x | x | | | | |||||
| | tf.net 0.15 | x | x | | | | | |||||
| | tf.net 0.14 | x | | | | | | |||||
| | 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 | | |||||
| | -------------------------- | ------------- | -------------- | ------------- | ------------- | ------------ | ------------ | | |||||
| | tf.net 0.10x, tf.keras 0.10 | | | | | | x | | |||||
| | tf.net 0.7x, tf.keras 0.7 | | | | | x | | | |||||
| | tf.net 0.4x, tf.keras 0.5 | | | | x | | | | |||||
| | tf.net 0.3x, tf.keras 0.4 | | | x | | | | | |||||
| | tf.net 0.2x | | x | x | | | | | |||||
| | tf.net 0.15 | x | x | | | | | | |||||
| | tf.net 0.14 | x | | | | | | | |||||
| ``` | |||||
| tf.net 0.4x -> tf native 2.4 | |||||
| tf.net 0.6x -> tf native 2.6 | |||||
| tf.net 0.7x -> tf native 2.7 | |||||
| tf.net 0.10x -> tf native 2.10 | |||||
| ... | |||||
| ``` | |||||
| 如果使用过程中发现有缺失的版本,请告知我们,谢谢! | 如果使用过程中发现有缺失的版本,请告知我们,谢谢! | ||||