TensorFlow for .NET Release Candidate

Today LostTech.TensorFlow, our C# binding to TensorFlow, gets its first Release Candidate available to the public. It brings a stable API, that mirrors TensorFlow 1.15, and includes tensors, graphs, and sessions, along with Keras, an optional eager execution mode, and much more.

Check out the product webpage for the overview of available features. See our samples or just install the NuGet package and start your journey into deep learning with .NET!

This Release Candidate comes with a go-live license, meaning unlike the previews, it has no expiration date and is fully supported.

LostTech.TensorFlow is completely free for individuals and small businesses, while larger enterprises can get a pay-as-you-go license through their Azure Subscription, which includes some trial credits. Please, contact Sales if you need the license for disconnected use cases.


Why LostTech.TensorFlow

Full deep learning power

To this date people struggle to implement state of the art algorithms for computer vision (YOLOv3) and language processing (GPT and BERT) using TensorFlow.NET, our competitor, due to the lack of required features.

In comparison, our GPT-2 demo was made in one week and included support for training just a month after Open AI released the smaller model back in February 2019, thanks to the API parity with TensorFlow for Python.

TensorBoard screenshot

Best performance

We are using optimized builds of TensorFlow provided by Google, which come with all performance-related bells and whistles.

We are leaving the full comparison to reviewers, but in a simple test we made out of TensorFlow.NET’s official sample, LostTech.TensorFlow came about 18% faster than TensorFlow.NET to train a convolutional neural network.

The use of the official TensorFlow builds with LostTech.TensorFlow enables you to take advantage not only of NVidia GPUs, but also of AMD accelerators using tensorflow-rocm, and Tensor Processing Units in Google Cloud.

18% faster than TF.NET

Integration with Unity ML Agents

LostTech.TensorFlow includes support for interaction with virtual environments built with Unity ML Agents.

This allows to train deep learning models using .NET in detailed simulated environments, that can be transferred to power real-life robots. This also opens an opportunity to expand in-game AI characters with human-like features.

Check out our blog post, that covers building and training an agent in a virtual Unity environment using deep reinforcement learning.

Trained bot playing 3DBall

Commercial support

We provide full support for LostTech.TensorFlow on AMD64/x64 hardware on Linux, MacOS, and Windows. We will resolve any issues caused by the product in accessing supported TensorFlow 1.15 APIs.

What’s new in this release

New features and bug fixes

This section describes changes since the Preview 7 released in Q1 2020. To view a summary of change history prior to Preview 7, check out the Release Notes section of the package.

Static types has been made more precise

  • Most used APIs are now better typed. Nearly all methods in tf that previously returned dynamic now correctly return Tensor objects.
  • Introduced Tensor<T>, that improves interoperability with generic code.
  • ndarray<T> has been improved.

Easier debugging

  • Improved exception handling experience. Most scenarios now throw subclasses of .NET Exception rather than a generic PythonException error. Full TensorFlow stack trace is included.
  • Core components now include debug symbols.
  • The Python interop library package comes with Source Link enabled giving an easy access to its source code from IDE.

Easy to get started

  • By default 1D .NET arrays and LINQ-produced enumerables are automatically converted to Python lists to simplify interaction with badly-written parts of TensorFlow. This feature can be disabled using properties of corresponding codecs.

Closer to the RTM

Pay-As-You-Go via Azure

Pay-As-You-Go is a novel licensing method, that should help you get started quickly and only pay for LostTech.TensorFlow when you are actually using it.

If you have an existing Azure Subscription, you can get a key through it. You have to have an Owner role to set it up. The key can be used on any Internet-connected machine (intermittent connectivity issues are well-tolerated), including machines outside of Azure fabric, such as company workstations. Our licensing library will record the time the process is running along with the information about the host hardware, and charge your Azure Subscription accordingly.

The offer includes about 200 free hours per month of training/inference on a Tesla K80 GPU (hardware not included).

Get it now

Azure Logo

Stable API

Starting with Release Candidate, future versions of LostTech.TensorFlow will adhere to SemVer, meaning that the code written with older version will be compatible with any future updates up until 2.0 is released.


The Release Candidate has no expiration date, and comes with a license, that permits commercial use. However, you will have to upgrade to the final release once it is out to continue receiving support.

New package name: LostTech.TensorFlow

For clarity, we changed the name of the NuGet package to LostTech.TensorFlow. Gradient package will be marked obsolete and should not be used.


LostTech.TensorFlow is a powerful deep learning library for .NET, that can be used to build state of the art algorithms with just a few lines of code on your platform of choice without the need to leave the familiar tech stack.

Grab it now from our website, and get started with samples.


TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.

Azure is a trademark of Microsoft Corporation.

Lost Tech LLC is thankful to Google developers for creating an excellent deep learning library.

Written on August 27, 2020