Questions tagged [tensorflowsharp]

For questions about the high-level .NET bindings for Google's TensorFlow machine learning library for use in C#/F# programs. Do not use this tag for questions about the TensorFlow Python library itself.

TensorFlowSharp is a set of bindings that allows the use of TensorFlow's C API within C#/F# programs.

20 questions
11
votes
2 answers

Exception CallbackOnCollectedDelegate when creating tensorflow graph

I try to build a little tensorflow application with TensorFlowSharp and sometimes I recieve this exception: Managed Debugging Assistant 'CallbackOnCollectedDelegate' For the function TensorFlowSharp!TensorFlow.TFBuffer+BufferReleaseFunc::Invoke I…
Bruno
  • 894
  • 11
  • 32
4
votes
3 answers

Load a pb model file into TensorFlowSharp

I have some Keras experience and am learning TensorFlowSharp (https://github.com/migueldeicaza/TensorFlowSharp). Using the ExampleInceptionInference project, I want to use a model I trained in my Keras python code. (I have created a .pb file using…
Sugrue
  • 3,629
  • 5
  • 35
  • 53
3
votes
2 answers

How to transform Byte[](decoded as PNG or JPG) to Tensorflows Tensor

I'am trying to use Tensorflowsharp in a Project in Unity. The problem i'm facing is that for the transform you usually use a second Graph to transform the input into a tensor. The used functions DecodeJpg and DecodePng are not supported on Android…
3
votes
0 answers

TensorFlow RNN limitations in regards to grouped data

This is a bit of an abstract problem and I hope someone has a good answer if it's feasable to start with, I'm planning to implement it as a RNN using TensorFlowSharp wrapper. However with implementing this I ran into a few questions that are pretty…
2
votes
1 answer

Tensorflowsharp results getvalue() is very slow

I am using TensorflowSharp to run evaluations using a neural network on an Android phone. I am building the project with Unity. I am using the tensorflowsharp unity plugin listed under the requirements here:…
the_cheff
  • 4,690
  • 3
  • 15
  • 23
2
votes
1 answer

How to serialize tensor input required by dnnclassifier (serving_input_reciever)

I want to be able to use the dnnclassifier (estimator) on top of IIS using tensorflowsharp. The model has previously been trained in python. I got so far that I can now generate PB files, know the correct input/outputs, however I am stuck in…
Klaas
  • 243
  • 1
  • 3
  • 12
2
votes
1 answer

How to reshape a tensor in TensorFlowSharp

TensorFlowSharp is the wrapper of TensorFlow in c# platform. click it to jump to TensorFlowSharp github Now i need to reshape a tensor with shape [32,64,1] into a new tensor with shape [1, 2048].But as i refer to the official API document, the usage…
FesianXu
  • 447
  • 4
  • 19
1
vote
0 answers

TensorflowSharp and model from hub without input

I'm trying to port a python code to TensorflowSharp. It loads a TF2 saved model from here which gets Feature vectors of images. Python code: # This is required for the mobilenet model we are using img = tf.image.convert_image_dtype(img,…
Dmi Dev
  • 11
  • 1
1
vote
0 answers

Deploying Tensorflow Trained model on HoloLens

I am developing an extension for an existing app for HoloLens that should use a model which was trained by tensorflow. My attempt is to use TensorFlowSharp because the existing app is using unity (C#). I build using: Scripting Runtime Version:…
0
votes
1 answer

How to use tensorflow-gpu in unity mobile

I'm prototyping mobile ml application within Unity engine. I have trained tensorflow graph (.pb) and I want to run the model in unity mobile. (both android and ios) With OpenCVForUnity plugin, with dnn module, I can run tensorflow graph in mobile.…
JokyDandy
  • 59
  • 1
  • 8
0
votes
1 answer

How to fix "libtensorflow DllNotFoundException" when I already have the file?

I'm new to C# and I've been researching this error for a long time. I wanted to use my trained TensorFlow model with Tensorflowsharp in Visual Studio for Mac so I created a .NET console project and installed TensorflowSharp 1.13.0 from nuget.org…
Ethan Chen
  • 305
  • 2
  • 7
0
votes
1 answer

How to encode .JPG file from a Tensor with TensorFlowSharp?

I want save .JPG image file from a Tensor with TensorFlowSharp. I tried GetValue() to get the value of tensor, but I always met an issue InvalidCastException: Specified cast is not valid. the issue shown in unity is below: InvalidCastException:…
0
votes
0 answers

Freezing fine-tuned graph for TensorFlowSharp with TF 1.4

I've fine-tuned a model (using TF 1.9) from Object Detection Zoo Model and right now I am trying to freeze the graph for TensorFlowSharp using TF 1.9. import tensorflow as tf import os from tensorflow.python.tools import freeze_graph from…
0
votes
1 answer

tensorflow batch normalization freeze

I'm trying to implement frozen graph on unity. But I have some error. I think the error related on batch normalization but I have no idea to solve this problem. When I train my model BN is necessary so I can't just remove the BN. So I have to find…
0
votes
1 answer

Tensorflowsharp and Retinanet -- How to determine what to Fetch when graph is run?

I've been using TensorflowSharp with Faster RCNN successfully for a while now; however, I recently trained a Retinanet model, verified it works in python, and have created a frozen pb file for use with Tensorflow. For FRCNN, there is an example in…
Bryan Greenway
  • 703
  • 11
  • 30
1
2