Skip to content

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 deyhuang@microsoft.com

Signed-off-by: Deyu Huang <deyhuang@microsoft.com>
@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 <deyhuang@microsoft.com>
@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

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.

@xadupre xadupre merged commit 3dd7729 into onnx:main Feb 4, 2025
40 of 41 checks passed
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.

2 participants