-
Notifications
You must be signed in to change notification settings - Fork 75.3k
How to load onnx model in Keras #42198
Copy link
Copy link
Closed
Labels
TF 2.2Issues related to TF 2.2Issues related to TF 2.2staleThis label marks the issue/pr stale - to be closed automatically if no activityThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from authorStatus - Awaiting response from authortype:othersissues not falling in bug, perfromance, support, build and install or featureissues not falling in bug, perfromance, support, build and install or feature
Metadata
Metadata
Assignees
Labels
TF 2.2Issues related to TF 2.2Issues related to TF 2.2staleThis label marks the issue/pr stale - to be closed automatically if no activityThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from authorStatus - Awaiting response from authortype:othersissues not falling in bug, perfromance, support, build and install or featureissues not falling in bug, perfromance, support, build and install or feature
Hello!
Keras version: 2.4.3
Tensorflow version: 2.2.0
Python version: 3.7.7
OS: Windows 10 x64
I want to load onnx model (this yolov3 model) in keras.
I download this model and run command to convert onnx to pb file, like this:
nnx-tf convert -i yolov3.onnx -o saved_model.pb
this command was taken from link
Command finished with success!
Then i try to load pb file like this:
from tensorflow import keras model = keras.models.load_model('my path to folder with saved_model.pb file')And result is error:
String field 'tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version' contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
Please help