Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. TensorFlowSharp

TensorFlowSharp

MITC#

A .NET binding to the TensorFlow C API for running existing machine learning models in C# and F#.

GitHubGitHub
3.1k stars559 forks0 contributors

What is TensorFlowSharp?

TensorFlowSharp is a .NET binding to the TensorFlow C API that enables running pre-trained TensorFlow machine learning models within .NET applications. It provides a low-level, strongly-typed interface for loading TensorFlow graphs and executing them using C# or F#, allowing developers to integrate ML models into .NET workflows without relying on Python at runtime.

Target Audience

.NET developers who need to deploy or integrate existing TensorFlow models into C# or F# applications, particularly those working on inference pipelines or applications requiring model execution within a .NET environment.

Value Proposition

TensorFlowSharp offers a direct, low-level binding to TensorFlow's native runtime, ensuring compatibility with existing models and providing fine-grained control over graph execution, making it ideal for scenarios where model performance and integration with .NET ecosystems are critical.

Overview

TensorFlow API for .NET languages

Use Cases

Best For

  • Running pre-trained TensorFlow models in .NET applications
  • Integrating machine learning inference into C# or F# backend services
  • Prototyping models in Python and deploying them in .NET environments
  • Building .NET applications that require low-level TensorFlow graph manipulation
  • Executing TensorFlow models in F# Interactive for exploratory data analysis
  • Performance-sensitive applications needing memory-efficient model execution

Not Ideal For

  • Teams wanting to build or train TensorFlow models from scratch entirely in .NET without Python
  • Projects that require high-level APIs like Keras for rapid model development and experimentation
  • Environments where active maintenance, frequent updates, and community support are critical
  • Applications prioritizing ease of use over low-level control, such as those using modern .NET ML frameworks like ML.NET

Pros & Cons

Pros

Native Low-Level Access

Provides direct binding to TensorFlow's C API, exposing full control over graphs and sessions, similar to Java and Go bindings, for precise model execution.

Memory Efficiency

Supports memory reuse through runner instances and input tensors, minimizing allocations for performance-sensitive applications, as shown in the README's GC-aware example.

Multi-Language Support

Works with both C# and F#, including F# Interactive scripting, blending seamlessly into .NET ecosystems with familiar naming conventions.

Compatibility with Pre-trained Models

Can load and execute models saved from Python environments like TensorFlow or Keras, enabling .NET deployment of Python-trained models without runtime Python dependencies.

Cons

Limited High-Level API

Lacks the high-level operations found in Python bindings, making it cumbersome for tasks beyond model execution, as the README admits and recommends TensorFlow.NET for this.

Maintenance and Support Issues

The project is not actively maintained, with the author explicitly pointing users to TensorFlow.NET, risking outdated dependencies and limited bug fixes.

Verbose and Complex Setup

Requires explicit graph and session management, leading to boilerplate code for simple tasks compared to more abstracted .NET machine learning libraries.

Frequently Asked Questions

Quick Stats

Stars3,147
Forks559
Contributors0
Open Issues187
Last commit2 years ago
CreatedSince 2017

Tags

#xamarin#mono#f-sharp#native-binding#model-inference#dotnet#tensorflow#c-sharp#machine-learning#dot-net

Built With

T
Tensorflow C API
F
F#
.
.NET
C
C++

Included in

Core21.2k
Auto-fetched 1 day ago

Related Projects

WaveFunctionCollapseWaveFunctionCollapse

Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics

Stars25,424
Forks1,369
Last commit7 days ago
ML.NETML.NET

ML.NET is an open source and cross-platform machine learning framework for .NET.

Stars9,361
Forks1,959
Last commit1 day ago
AccordAccord

Machine learning, computer vision, statistics and general scientific computing for .NET

Stars4,531
Forks1,966
Last commit6 years ago
CatalystCatalyst

🚀 Catalyst is a C# Natural Language Processing library built for speed. Inspired by spaCy's design, it brings pre-trained models, out-of-the box support for training word and document embeddings, and flexible entity recognition models.

Stars860
Forks86
Last commit15 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub