Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add a contrib operator for dynamic reshape #15872

Merged
merged 20 commits into from
Sep 8, 2020
Merged

Conversation

vandanavk
Copy link
Contributor

@vandanavk vandanavk commented Aug 13, 2019

Description

MXNet's reshape operator expects the shape to be a static tuple. In some models, the shape attribute is decided based on the output of the previous layer. Example, #10789. Adding support for allowing a tensor for the target shape in Reshape.

Based on #14393

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

Dynamic reshape:

  • Add a contrib operator for dynamic reshape
  • Add test cases

Comments

Forward pass takes the same time as the original reshape operator

@vandanavk vandanavk requested a review from szha as a code owner August 13, 2019 14:03
@vandanavk
Copy link
Contributor Author

@mxnet-label-bot add [pr-work-in-progress, Operator, ONNX]

@Rafis1988
Copy link

Hi @vandanavk. I see that these changes have to fix onnx model import error. Sorry for a stupid question. How can I use them? Or I have to wait before it gets reviewed? I stuck on this problem for two weeks.

@vandanavk
Copy link
Contributor Author

@mxnet-label-bot update [Operator, pr-awaiting-review]

@marcoabreu marcoabreu added pr-awaiting-review PR is waiting for code review and removed ONNX pr-work-in-progress PR is still work in progress labels Aug 24, 2019
@vandanavk
Copy link
Contributor Author

@junrushao1994 for review

@vandanavk
Copy link
Contributor Author

Hi @vandanavk. I see that these changes have to fix onnx model import error. Sorry for a stupid question. How can I use them? Or I have to wait before it gets reviewed? I stuck on this problem for two weeks.

You might have to pull in changes from all the following PRs into your copy of mxnet, build and then try to convert. The PRs are #15872, #15993, #15995, #15996

@apeforest
Copy link
Contributor

@samskalicky Would you mind reviewing this PR since it's related to dynamic reshape?

@samskalicky
Copy link
Contributor

Thanks for this contribution @vandanavk! Sorry its been sitting so long without review. Theres a few things i dont understand, i left some comments. could you please clarify?

@vandanavk
Copy link
Contributor Author

Thanks for this contribution @vandanavk! Sorry its been sitting so long without review. Theres a few things i dont understand, i left some comments. could you please clarify?

thanks for the review @samskalicky. let me know if the responses make things a little more clear

Copy link
Contributor

@apeforest apeforest 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 your contribution. Left a few comments.

@vandanavk vandanavk requested a review from apeforest January 17, 2020 01:09
@vandanavk
Copy link
Contributor Author

@samskalicky @apeforest Addressed all review comments so far

Copy link
Contributor

@apeforest apeforest left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@apeforest
Copy link
Contributor

@zheng-da may be interested to take a look?

@szha szha self-assigned this Sep 7, 2020
@szha szha merged commit 0c0457a into apache:master Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Operator pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants