All Projects → tengge1 → Learn Tensorflow Sharp

tengge1 / Learn Tensorflow Sharp

Licence: mit
TensorflowSharp tutors and examples.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Learn Tensorflow Sharp

flytesnacks
Flyte User-Guides and Tutorials - https://flytecookbook.readthedocs.io
Stars: ✭ 39 (-67.5%)
Mutual labels:  examples, tutorials
Romaniancoderexamples
Java / SpringBoot / Angular examples for the Romanian Coder YouTube channel
Stars: ✭ 353 (+194.17%)
Mutual labels:  examples, tutorials
tutorials
All of our code examples and tutorials
Stars: ✭ 62 (-48.33%)
Mutual labels:  examples, tutorials
awesome.gl
棒棒哒攻略:Developer's Technical Documents, API References, Code Examples, Quick Starts, Programming minutebooks, and Tutorials. https://awesome.gl
Stars: ✭ 12 (-90%)
Mutual labels:  examples, tutorials
Haxejs
Documentation about using JavaScript with Haxe
Stars: ✭ 25 (-79.17%)
Mutual labels:  examples, tutorials
haxeunity
Documentation about using Unity (c#) with Haxe
Stars: ✭ 16 (-86.67%)
Mutual labels:  examples, tutorials
Tesseract
A set of libraries for rapidly developing Pipeline driven micro/macroservices.
Stars: ✭ 20 (-83.33%)
Mutual labels:  examples, tutorials
Learningx
Deep & Classical Reinforcement Learning + Machine Learning Examples in Python
Stars: ✭ 241 (+100.83%)
Mutual labels:  examples, tutorials
Rxjava2 Android Samples
RxJava 2 Android Examples - Migration From RxJava 1 to RxJava 2 - How to use RxJava 2 in Android
Stars: ✭ 4,950 (+4025%)
Mutual labels:  examples, tutorials
Go Packages
A large repository of code and documented examples for Go's standard package library.
Stars: ✭ 467 (+289.17%)
Mutual labels:  examples, tutorials
GeoStatsTutorials
GeoStats.jl tutorials
Stars: ✭ 49 (-59.17%)
Mutual labels:  examples, tutorials
Sketchup Ruby Api Tutorials
SketchUp Ruby API Tutorials and Examples
Stars: ✭ 105 (-12.5%)
Mutual labels:  examples, tutorials
godot-practice-shaders
Some practice shaders in Godot
Stars: ✭ 79 (-34.17%)
Mutual labels:  examples, tutorials
goodcode
A curated collection of annotated code examples from prominent open-source projects
Stars: ✭ 184 (+53.33%)
Mutual labels:  examples, tutorials
Manual Testing
This repository contains the General Test Cases for performing Manual Testing on the Web/Mobile application. It also has Test cases related to API Testing. Templates related to Test Plan and BugBash are also updated.
Stars: ✭ 134 (+11.67%)
Mutual labels:  examples, tutorials
aicloud-examples
Примеры distributed machine learning с помощью сервиса AICloud
Stars: ✭ 24 (-80%)
Mutual labels:  examples, tutorials
Pharo Wiki
Wiki related to the Pharo programming language and environment.
Stars: ✭ 161 (+34.17%)
Mutual labels:  examples, tutorials
Examples
Jina examples and demos to help you get started
Stars: ✭ 185 (+54.17%)
Mutual labels:  examples, tutorials
Vulkandemos
Some simple vulkan examples.
Stars: ✭ 413 (+244.17%)
Mutual labels:  examples, tutorials
Lis Ynp
🔮 Life is short, you need PyTorch.
Stars: ✭ 92 (-23.33%)
Mutual labels:  examples, tutorials

TensorflowSharp教程

Tensorflow是一个人工智能框架。TensorflowSharp是对Tensorflow C语言版接口的封装,便于.net开发人员在项目中使用Tensorflow。

目录

01 HelloWorld:TensorflowSharp入门。

02 UsePlaceholder:占位符的使用。

03 UseVariable:变量的使用。

04 InitVariable:变量的初始化。

05 UseMatrix:矩阵相加、数乘、矩阵相乘。

p06_LinearRegression:线性回归。

p07_MNIST:手写数字识别。

p08_UseTensor:张量的使用。

p09_GenerateData:产生序列、正态分布随机数和随机位置。

p10_CalculateGradient:计算倾斜度(偏导数)。

p11_ReduceMethod:ReduceMean、ReduceSum计算原理和方法。

p12_ClipMatrix:裁剪矩阵(限制矩阵的最小、最大值)。

p13_BitwiseOperation:按位与、按位或、按位异或运算。

p14_UseStack:使用堆栈。

p15_PartialRun:部分运行。

p16_ModelSave:保存模型。(未实现)

p17_TFCoreTest:TFCore测试。

p18_TFBufferTest:TFBuffer测试。

p19_TFDataTypeTest:TFDataType测试。

p20_ComparisonOperators:比较运算符。

p22_ConditionalOperators:条件运算符。

示例

TensorflowSharp的用法还是很简单的

// 创建图
var g = new TFGraph();

// 定义常量
var a = g.Const(2);
var b = g.Const(3);

// 加法和乘法运算
var add = g.Add(a, b);
var mul = g.Mul(a, b);

// 创建会话
var sess = new TFSession(g);

// 计算加法
var result1 = sess.GetRunner().Run(add).GetValue();
Console.WriteLine("a+b={0}", result1);

// 计算乘法
var result2 = sess.GetRunner().Run(mul).GetValue();
Console.WriteLine("a*b={0}", result2);

// 关闭会话
sess.CloseSession();

执行后输出结果

a+b=5
a*b=6

注意事项

  1. 国内目前无法访问Tensorflow官网,但是可以访问谷歌提供的Tensorflow官网镜像

  2. 国内使用NuGet安装TensorflowSharp很容易失败,可以直接从Nuget官网下载,然后改后缀名zip,解压后手工安装。

  3. TensorflowSharp项目使用的.net版本必须高于4.6.1,本教程使用的版本是4.7.0,可以在属性选项卡中设置。

  4. TensorflowSharp项目必须使用64位CPU,需要在属性选项卡生成中,去掉首选32位的勾选

  5. 本教程需要在根目录新建Libs文件夹,请将第二步解压出来的TensorFlowSharp.dll放在该文件夹;另外运行示例还需要把libtensorflow.dll复制到每个项目的bin/Debug目录。如果提示找不到Tensorflow命名空间,请重新添加引用。

  6. 最新版libtensorflow.dll下载:http://ci.tensorflow.org/view/Nightly/job/nightly-libtensorflow-windows/lastSuccessfulBuild/artifact/lib_package/libtensorflow-cpu-windows-x86_64.zip

网站

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].