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

Enhance BatchToSpaceND and SpaceToBatchND handlers #1386

Merged
merged 8 commits into from Mar 11, 2021

Conversation

mateusztabaka
Copy link
Contributor

  • add explicit NHWC_TO_NCHW and NCHW_TO_NHWC transposes so they can be
    eliminated with its counterpart in TransposeOptimizer
  • handle nonconst pads and crops

Signed-off-by: Mateusz Tabaka mateusz.tabaka@intel.com

mateusztabaka and others added 5 commits March 8, 2021 07:57
- add explicit NHWC_TO_NCHW and NCHW_TO_NHWC transposes so they can be
  eliminated with its counterpart in TransposeOptimizer
- handle nonconst pads and crops

Signed-off-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
@TomWildenhain-Microsoft
Copy link
Contributor

Is this ready for review + merge?

@mateusztabaka
Copy link
Contributor Author

Is this ready for review + merge?

Yes

Copy link
Contributor

@TomWildenhain-Microsoft TomWildenhain-Microsoft left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I'm not entirely sure that your code is being tested. Can you double-check?

@@ -3323,7 +3323,7 @@ def func(x, z):

@check_opset_min_version(11, "SpaceToBatchND")
def test_space_to_batchnd_non_const_7d(self):
x_type, y_type, z_type = np.int64, np.int64, np.int64
x_type, y_type, z_type = np.float32, np.int64, np.int64
Copy link
Contributor

Choose a reason for hiding this comment

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

The black_shapes include [2, 2] in this case, so it appears the code is properly tested.

tests/test_backend.py Show resolved Hide resolved
Signed-off-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
@TomWildenhain-Microsoft TomWildenhain-Microsoft merged commit 1db1270 into onnx:master Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants