Error loading a frozen graph ( float incompatible with float_ref )
See original GitHub issueI froze the 20170131-234652 model using the freeze_graph.py, but I cannot load it in C++.
I first read the binaryproto successfully as:
tensorflow::GraphDef graph_def;
Status load_graph_status = ReadBinaryProto(tensorflow::Env::Default(), graph_file_name, &graph_def);
But, it gives an error while creating the graph to be used for the session:
std::unique_ptr<tensorflow::Session> session(tensorflow::NewSession(tensorflow::SessionOptions()));
tensorflow::Status sessionCreateStatus = session->Create(graphDef);
The error is:
Invalid argument: Input 0 of node InceptionResnetV1/Block8/Branch_1/Conv2d_0c_3x1/BatchNorm/cond/AssignMovingAvg_1/Switch was passed float from InceptionResnetV1/Block8/Branch_1/Conv2d_0c_3x1/BatchNorm/moving_variance:0 incompatible with expected float_ref.
Any ideas how to solve this problem?
Thanks in advance 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (8 by maintainers)
Top Results From Across the Web
Input 0 of node incompatible with expected float_ref.** - ...
I'm getting below exception while trying to import my optimized frozen graph. # read pb into graph_def with tf.gfile.GFile(pb_file, "rb") as ...
Read more >Save, Load and Inference From TensorFlow 2.x Frozen Graph
In this blog post, I am going to show how to save, load, and run inference for frozen graphs in TensorFlow 2.x.
Read more >C2000™ Piccolo™ Workshop
Code Composer Studio can automatically load the output file after a successful ... future knowlege, realize that a single code error can sometimes...
Read more >incompatible with expected resource - TensorRT
I did the below before loading the model while converting my keras model to a tensorflow graph as per https://stackoverflow.com/a/52823701:
Read more >Frequently asked Questions about Caml (expert)
Error message: a type is not compatible with itself ? * How polymorphism is introduced ? * What means '_a ? * A...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
my code
BTW, this error also happens when I load the .pb model in Python:
ValueError: graph_def is invalid at node 'InceptionResnetV1/Conv2d_1a_3x3/BatchNorm/cond/AssignMovingAvg/Switch': Input tensor 'InceptionResnetV1/Conv2d_1a_3x3/BatchNorm/moving_mean:0' Cannot convert a tensor of type float32 to an input of type float32_ref.