Click here to Skip to main content
15,894,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I develop a face recognizer(as an image classification model) software.i trained several ml.net models via image classification catalog and tensorflow models via colab.all models works satisfactory but i have a big problem; in order to use ml.net trained models i have to install nuget SciSharp.TensorFlow.Redist 2.3.1 but some of others(colab trained ones) gives this error when i try to use;

Tensorflow.InvalidArgumentError: Converting GraphDef to Graph has failed. The binary trying to import the GraphDef was built when GraphDef version was 440. The GraphDef was produced by a binary built when GraphDef version was 1645.


when i update nuget SciSharp.TensorFlow.Redist 2.16.0 colab trained models works fine but ml.net trained models gives this error but it occurs sometimes;

System.EntryPointNotFoundException: Unable to find an entry point named 'TF_StringEncodedSize' in DLL 'tensorflow'. at Tensorflow.c_api.TF_StringEncodedSize(UInt64 len) at Microsoft.ML.Vision.ImageClassificationTrainer.EncodeByteAsString(VBuffer1 buffer)    at Microsoft.ML.Vision.ImageClassificationTrainer.ImageProcessor.ProcessImage(VBuffer1& imageBuffer) at Microsoft.ML.Vision.ImageClassificationModelParameters.Classifier.Score(VBuffer1& image, Span1 classProbabilities) at Microsoft.ML.Vision.ImageClassificationModelParameters.<>c__DisplayClass22_02.<Microsoft.ML.Data.IValueMapper.GetMapper>b__0(VBuffer1& src, VBuffer1& dst)    at Microsoft.ML.Data.SchemaBindablePredictorWrapperBase.<>c__DisplayClass19_02.b__0(TDst& dst) at Microsoft.ML.Data.PredictedLabelScorerBase.EnsureCachedPosition[TScore](Int64& cachedPosition, TScore& score, DataViewRow boundRow, ValueGetter1 scoreGetter)    at Microsoft.ML.Data.MulticlassClassificationScorer.<>c__DisplayClass16_0.<GetPredictedLabelGetter>b__1(VBuffer1& dst) at Microsoft.ML.Data.TypedCursorable1.TypedRowBase.<>c__DisplayClass8_01.b__0(TRow row) at Microsoft.ML.Data.TypedCursorable1.TypedRowBase.FillValues(TRow row)  at Microsoft.ML.Data.TypedCursorable1.RowImplementation.FillValues(TRow row) at Microsoft.ML.PredictionEngineBase2.FillValues(TDst prediction)    at Microsoft.ML.PredictionEngine2.Predict(TSrc example, TDst& prediction) at Microsoft.ML.PredictionEngineBase`2.Predict(TSrc example) at FaceRecognizer.MyTrainer.Predictor.Predict(GlobalImageInput inp) in E:\source\repos\Setup_Projects\FaceRecognizer\FaceRecognizer\MyTrainer\Predictor.cs:line 52


i found that TF_StringEncodedSize function no longer exists after tensorflow 2.4.0 . Is there a way to use all models in my app?for example, can i use different versions of this SciSharp.TensorFlow.Redist nuget while runtime,i mean is there any way of changing the version of this nuget at runtime? if no, how can i handle this situation?

What I have tried:

i tried different combinations of these nugets
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900