workflowstacks
support

TensorFlow.NET: Machine Learning in C#

Develop ML models in C# and F# with TensorFlow.NET, for founders building AI-driven apps, backed by 3.4k+ GitHub stars
3,393 stars541 forksC#Health Score 9/10Updated 1/22/2025100% free · open source
What it does

TensorFlow.NET allows developers to build and run machine learning models in C# and F# using the TensorFlow framework

Install / run
Install-Package TensorFlow.NET -Version 2.4.0
When to use it
  • Building AI-driven Windows desktop or mobile apps
  • Developing machine learning models for .NET-based web applications
  • Integrating TensorFlow models into existing C# or F# projects
Quick start
  1. 1Create a new C# console application using `dotnet new console`
  2. 2Install the TensorFlow.NET NuGet package using `Install-Package TensorFlow.NET`
  3. 3Import the TensorFlow.NET namespace with `using TensorFlow;`
  4. 4Load a pre-trained TensorFlow model using `TF.Graph.Import`
  5. 5Use the `TF.Session` class to run the model and get predictions
Ready-to-paste prompt
TF.Graph.Import("path/to/model.pb"); var session = new TF.Session(); var input = TF Placeholder("input:0"); var output = session.Run(new[] { input }, new[] { "output:0" });
Heads up: Make sure to install the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, or 2019, as it is a prerequisite for running TensorFlow.NET
Saves to your device

Topics

chatbot
csharp
deep-learning
dotnetcore
keras
machine-learning
scisharp
tensorflow
What's inside — free to inspect
No purchase needed

Read the entire source before you build — unlike paid marketplaces that hide it behind a buy button.

9
top-level files
8
folders
371.9M
source size
Apache-2.0
license
Key files
README.md
File tree
.github/
data/
docs/
graph/
redist/
src/
test/
tools/
.gitattributes
.gitignore
CODEOWNERS
Directory.Build.props
Directory.Build.targets
LICENSE
README.md
TensorFlow.NET.sln
TensorFlow.NET.sln.DotSettings
Quick Actions
Details
Creator
SciSharp
Language
C#
Category
support
Published
12/10/2018

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.