Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in save() method of ONNXWrapper class #4

Open
shiqiangw opened this issue Sep 4, 2024 · 0 comments
Open

Bug in save() method of ONNXWrapper class #4

shiqiangw opened this issue Sep 4, 2024 · 0 comments

Comments

@shiqiangw
Copy link
Contributor

Some part of the code in the save() method of ONNXWrapper class assumes a Keras model, but the load() method that uses onnx.load() returns a ModelProto model.

For ModelProto model, the following line doesn't work because ModelProto does not have layers attribute, for instance:

input_dims = self.model.layers[0].get_config()['batch_input_shape']

Some code in the save() method needs to be updated and onnx.save() should be used to save the OOD-enabled model. Parameters in the config file need to be read in a way using ModelProto methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant