dotnet / machinelearning-samples

Samples for ML.NET, an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
4.49k stars 2.68k forks source link

Custom model for image classification #180

Closed neumartin closed 5 years ago

neumartin commented 5 years ago

In the sample DeepLearning_ImageClassification_TensorFlow I try to create my own model folowing this: https://www.tensorflow.org/hub/tutorials/image_retraining

But when I execute the sample I get:

EXCEPTION ######### Input column 'input' does not exist in the model Parameter name: inputs

neumartin commented 5 years ago

@CESARDELATORRE, @asthana86, @mariuszwojcik can you help me?

CESARDELATORRE commented 5 years ago

Make sure the input tensor names match. You can open your TensorFlow model with a tool like Netron (https://github.com/lutzroeder/Netron), also coming in Visual Studio when you install "VS Tools for AI" to explore the TensorFlow model.

Check this intro: https://blogs.msdn.microsoft.com/dotnet/2018/09/12/announcing-ml-net-0-5/#added-a-tensorflow-model-scoring-transform-tensorflowtransform

Also, check this other ML.NET sample that I created: https://github.com/CESARDELATORRE/TensorFlowImageClassificationWebAPI In this case, the TensorFlow model is exported from Azure Cognitive Services Custom Vision, so it has different input names, etc.

asthana86 commented 5 years ago

Closing this issue, please feel free to open this if this doesn't solve the problem.