[tools/onnx-subgraph] support arbitrary input shape for onnx#14757
Merged
seanshpark merged 3 commits intoSamsung:masterfrom Mar 4, 2025
Merged
[tools/onnx-subgraph] support arbitrary input shape for onnx#14757seanshpark merged 3 commits intoSamsung:masterfrom
seanshpark merged 3 commits intoSamsung:masterfrom
Conversation
1. fixed input shape as default value 2. user can set the input shape dynamically with guide ONE-DCO-1.0-Signed-off-by: Youxin Chen <yx113.chen@samsung.com>
seanshpark
reviewed
Mar 3, 2025
| Subgraphsiostxt_path is a txt file that describes the structure of the model graph and | ||
| is used to get input/output node names.The model_path contains paths to multiple onnx files. | ||
| The load_sessions function will sort the onnx models in the model_path according to the | ||
| The load_sessions function will sort the onnx models in the model_path according to the |
Contributor
There was a problem hiding this comment.
plz split this to another PR. this change is not related to your commit message.
seanshpark
reviewed
Mar 3, 2025
Comment on lines
+65
to
+68
| f"Enter new shape for input '{input_name}' (comma-separated integers), or press Enter to use default: " | ||
| ) | ||
| custom_dtype_str = input( | ||
| f"Enter data type for input '{input_name}' ('f' for float32, 'i' for int64), or press Enter to use default: " |
Contributor
There was a problem hiding this comment.
it would be nice if you coult split lines so that it comes in 100 cols.
seanshpark
reviewed
Mar 3, 2025
| dtype = dtype_map.get(custom_dtype_str.strip(), None) | ||
| if dtype is None: | ||
| print("Invalid data type, please enter 'f' or 'i'.") | ||
| continue |
Contributor
There was a problem hiding this comment.
Q) if dtype is invalid contunue seems to skip input_name input. is it OK with it?
Contributor
Author
There was a problem hiding this comment.
yes, thank you for suggestion, I add dtype default setting for exception case, please check
update code as review, split too long lines, and add dtype default setting for exception case
fix format checking issue
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.
related issue: #14534
historical full changes PR: #14613
ONE-DCO-1.0-Signed-off-by: Youxin Chen yx113.chen@samsung.com