Fixed Conv3DTranspose with strides for data format channels_first (fixes #1714)#1748
Closed
Fixed Conv3DTranspose with strides for data format channels_first (fixes #1714)#1748
Conversation
| {"data": output_shape.output[0], "ends": [sp_index_start+3], "starts": [sp_index_start+2], "axes": [0]}) | ||
| expect_d = GraphBuilder(ctx).make_slice( | ||
| {"data": input_shape.output[0], "ends": [4], "starts": [3], "axes": [0]}) | ||
| {"data": input_shape.output[0], "ends": [sp_index_start+3], "starts": [sp_index_start+2], "axes": [0]}) |
Collaborator
There was a problem hiding this comment.
pylint is complaining that line and 533 are too long.
hwangdeyu
reviewed
Nov 19, 2021
onnx#1714) While shape calculations for the input correctly distinguished between channels_first and channels_last, shape calculations for the inputs of the final Slice and Pad nodes always assumed channels_last format. Signed-off-by: fthielke <[email protected]>
373519e to
a4327e1
Compare
hwangdeyu
reviewed
Feb 11, 2022
| sp_index_start = 1 if is_channels_last(node) else 2 | ||
| output_h = GraphBuilder(ctx).make_slice( | ||
| {"data": output_shape.output[0], "ends": [2], "starts": [1], "axes": [0]}) | ||
| {"data": output_shape.output[0], "ends": [sp_index_start+1], "starts": [sp_index_start], "axes": [0]}) |
Contributor
|
@fthielke Let me know if you have any questions. |
Signed-off-by: Jay Zhang <[email protected]>
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.
While shape calculations for the input correctly distinguished between channels_first and channels_last, shape calculations for the inputs of the final Slice and Pad nodes always assumed channels_last format.