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

Add shape inference as an arg for tools/onnx-optimize.py #1960

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hwangdeyu
Copy link
Contributor

@hwangdeyu hwangdeyu commented Jun 8, 2022

In

g = optimizer.optimize_graph(g)
the optimizer.optimize_graph() method would eliminate infered shape.
This PR adds the shape inference after model optimized.

Signed-off-by: Deyu Huang [email protected]

@hwangdeyu
Copy link
Contributor Author

An example node change.
example

@hwangdeyu hwangdeyu requested a review from fatcat-z June 9, 2022 06:33
Signed-off-by: Deyu Huang <[email protected]>
@hwangdeyu hwangdeyu changed the title Add shape inference for onnx-optimize Add shape inference for tools/onnx-optimize.py Jun 9, 2022
@hwangdeyu hwangdeyu changed the title Add shape inference for tools/onnx-optimize.py Add shape inference as an arg for tools/onnx-optimize.py Jun 9, 2022
@@ -64,10 +70,12 @@ def main():

model_proto = helper.make_model(onnx_graph, **kwargs)

model_proto_inferred = model_shape_inference(model_proto)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change it as a optional argument.

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

Successfully merging this pull request may close these issues.

1 participant