SciSharp / TensorFlow.NET

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.
https://scisharp.github.io/tensorflow-net-docs
Apache License 2.0
3.2k stars 514 forks source link

[Question]: Image batch run function error #1112

Open Cilouche opened 1 year ago

Cilouche commented 1 year ago

Description

Hello,

I'm working on inference with batch images, when I try to pass this batch of images with the function

results = sess.run(output_operation.outputs[0],
                   new FeedItem(input_operation.outputs[0], nd));

where nd is the image batch I get this error System.NullReferenceException: 'Object reference not set to an instance of an object. is the problem with the run function or the model input that with this format type:float32[?,128,128,3]

thanks

Alternatives

No response

Wanglongzhi2001 commented 10 months ago

Sorry for reply so late, it is wrong that the shape of the input is float32[?, 128, 128, 3], if you could please provide a minimal example code for reproduction, we can help you to solve the problem.