Reputation: 482
I was trying to freeze a pb file for using in the OpenVino. For freezing, i need to know the output node name. For that, i tried loading the pb file and reading the output names, but, it got an error. Then i tried to get the output name from the model summary and it was dense_7 (Dense).
I followed the command in https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#freeze-the-tensorflow-model to freeze the model. But when i try the output node name as dense_7 (Dense), I'm getting the following error:
AssertionError: dense_7 (Dense) is not in graph
I'm attaching the model summary along with this.
Is there any way to read the correct output name?
Upvotes: 1
Views: 1212
Reputation: 1413
Question 26 in the ‘Model Optimizer Frequently Asked Questions’ page addresses the error that you are facing. See https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html
I would suggest you try the following potential methods that have been shared in Github, available at the following links:
https://github.com/tensorflow/tensorflow/issues/3986#issuecomment-304619868 https://github.com/tensorflow/tensorflow/issues/3986#issuecomment-368282326 https://github.com/tensorflow/tensorflow/issues/3986#issuecomment-470083664 https://github.com/tensorflow/tensorflow/issues/3986#issuecomment-508897579
Do let us know if any of these works for you.
Upvotes: 3