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

Update shape inference documentation #4163

Merged
merged 3 commits into from
Apr 26, 2022
Merged

Conversation

gramalingam
Copy link
Contributor

Signed-off-by: Ganesan Ramalingam grama@microsoft.com

Description
Update the shape-inference documentation.

Motivation and Context
Helps developers who write shape-inference code for operators avoid some common mistakes.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@gramalingam gramalingam requested a review from a team as a code owner April 25, 2022 20:22
Copy link
Member

@jcwchen jcwchen left a comment

Choose a reason for hiding this comment

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

I like this document enhancement -- especially the documentation for shape inference utilities.

docs/ShapeInference.md Outdated Show resolved Hide resolved
@jcwchen jcwchen added the documentation Issues related to ONNX documentation label Apr 25, 2022
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
docs/ShapeInference.md Outdated Show resolved Hide resolved
handle the possibility that the dimension may not have a statically
known value.

There are several utility functions in [shape_inference.h](/onnx/defs/shape_inference.h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make sure users are using the utility functions to throw exceptions if one shape has an unexpecgted value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but, unfortunately, we are dependent on reviewers to check for this. Any other suggestions?

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@gramalingam gramalingam merged commit 6a43e97 into onnx:main Apr 26, 2022
liqunfu pushed a commit to liqunfu/onnx that referenced this pull request May 17, 2022
* Update shape inference documentation

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>

* Add an example.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>

* Move sub-section

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Signed-off-by: Liqun Fu <liqfu@microsoft.com>
broune pushed a commit to broune/onnx that referenced this pull request May 6, 2023
* Update shape inference documentation

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>

* Add an example.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>

* Move sub-section

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to ONNX documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants