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.24k stars 521 forks source link

Invalid GraphDef #914

Open jhoeing opened 2 years ago

jhoeing commented 2 years ago

I am new here. I use python tensorflow2 to train a xception(transfer learning) h5 model. In python, inference is ok. But in tensorflow.net, when predicting model, it shown up. I don't know how to fix it. Does anybody have solution?

image

Oceania2018 commented 2 years ago

You need to freeze the model as pb format.

jhoeing commented 2 years ago

Hello, Does this thransferlearning can use in other archtecture, ex: renet? Yesterday, I had tried inceptionv3 training with my data and the env was python tensorflow 2.8.0 keras. And I saved model to pb format. But when I used it, it shown another error like below.

oops

Oceania2018 commented 2 years ago

Please follow this example.