Update printable_graph in helper.py to output details of initializers that do not have matching graph inputs.#2135
Merged
wschin merged 9 commits intoonnx:masterfrom Sep 11, 2019
Conversation
An IR v4 model is not required to have matching graph inputs for all initializers. Update printable_graph to allow for this and output the name, type and shape of initializers with no matching graph input.
linkerzhang
approved these changes
Jul 12, 2019
wschin
approved these changes
Sep 10, 2019
Collaborator
wschin
left a comment
There was a problem hiding this comment.
It'd be better to add a test but this is not a blocking comment. Thank you!
Add test and tweak messaging
…leGraph' into OutputAllInitializersFromPrintableGraph
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Sep 23, 2020
… that do not have matching graph inputs. (onnx#2135) * Update helper.py An IR v4 model is not required to have matching graph inputs for all initializers. Update printable_graph to allow for this and output the name, type and shape of initializers with no matching graph input. * Add test for printable_graph Add test and tweak messaging * Fix comment formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An IR v4 model is not required to have matching graph inputs for all initializers. Update printable_graph to allow for this and output the name, type and shape of initializers with no matching graph input.
Example new output:
graph Example (
%feature[FLOAT, Sequencex1x32]
) overridable initializers (
%Block912_Output_0_shape[INT64, 3]
) initializers (
%Block912_Const_0[FLOAT, 32x128]
) {
...
}
Without the change there would be no information for Block912_Const_0 in the output.