Skip to content

How to load onnx model in Keras #42198

@Aleksey1555

Description

@Aleksey1555

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

Metadata

Metadata

Labels

TF 2.2Issues related to TF 2.2staleThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from authortype:othersissues not falling in bug, perfromance, support, build and install or feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions