Add resize to change_3d_tensors_to_4d transformation#125
Merged
maltanar merged 107 commits intofastmachinelearning:mainfrom Dec 17, 2024
Merged
Add resize to change_3d_tensors_to_4d transformation#125maltanar merged 107 commits intofastmachinelearning:mainfrom
maltanar merged 107 commits intofastmachinelearning:mainfrom
Conversation
…iksnagreb/qonnx into iksnagreb-feature/sort_commutative_inputs
This fixes some weird behavior where folding multiple nodes at once breaks the graph after the next shape inference.
…different node types
Contributor
Author
|
After deliberation with @fpjentzsch we decided to disallow the use of the ROI input and the axes attribute for the Resize operator. |
…eature/readme_dev_updates Updates to dev docs: pip upgrade, linting
…ngs_attr Feature/strings attr
now we have the tests to show that this works fine
…eature/remove_forked_identity Remove identity nodes with output forking
…eature/fp16_fixes Fixes for fp16 tensors and datatypes in ONNX
… into iksnagreb-fix/fold_constants
…nstants Fix FoldConstants tranformation exiting early to redo shape annotations
…s/qonnx into feature/improved_chanlast_eltwiseops
…eature/improved_chanlast_eltwiseops Improved channels-last via elementwise op generalization
…onnx_models Fix incorrect value_info setting in MergeONNXModels
Updated partitioning function for PartitionFromDict
…iple_default_values Add support for multiple default configurations
…ssen9/qonnx into klassen9-feature/resize_4d_conversion
Collaborator
|
Thanks @klassen9 . Since this is also related to #150 I took the liberty to extend the testcase generation to add a opset 13 version of Resize where the scale input is an empty string, which triggers the bug in #150 , and added exceptions in the core functions to handle this properly. Kind reminder: please ensure future PRs go through |
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.
This PR adds resize to the change_3d_tensors_to_4d transformation. The implementation supports resize version 10 up to 19.
Version 10 only supports
scalesas an input, other than the input tensor.Version 11 up to 19 additionally support the
roiandsizesinputs.sizesandscalesare mutually exclusive. The Problem is that different versions have a different understanding of how to mark an input as unused. As an example:sizesis needed, the user must setscalesto an empty tensor."sizesis needed, the user can use an empty string as the name ofscalesin this operator’s input list."I am thus checking if
scalesorsizesexist by checking if they are None or are empty. None is returned bymodel.get_initializer()if the input is an empty string in the input list.