mxnet
mxnet copied to clipboard
[BUGFIX] _npi_repeats with swap
Description
_npi_repeats gave correct outputs only when repetition happened on 0th axis. That's why swapaxes function was called before and after triggering _npi_repeats operator. swapaxes() was called from python side, thus when _npi_repeats was a node in a computational graph it resulted in wrong output (swapaxes wasn't called in that case).
Solution
Trigger SwapAxis operator directrly by _npi_repeats operator.
Checklist
Essentials
- [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
- [x] Changes are complete (i.e. I finished coding on this PR)
- [x] All changes have test coverage
- [x] Code is well-documented
Comments
- Added check for repeats parameter - it throws ValueError when length of the list is not equal to the number of elements on the axis that is going to be repeated (numpy compatibility)
Hey @Kacper-Pietkun , Thanks for submitting the PR All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:
- To trigger all jobs: @mxnet-bot run ci [all]
- To trigger specific jobs: @mxnet-bot run ci [job1, job2]
CI supported jobs: [centos-cpu, miscellaneous, windows-cpu, website, unix-cpu, centos-gpu, edge, sanity, windows-gpu, clang, unix-gpu]
Note: Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. All CI tests must pass before the PR can be merged.
@mxnet-bot run ci [centos-gpu]
Jenkins CI successfully triggered : [centos-gpu]
@mxnet-bot run ci [unix-gpu, website]
Jenkins CI successfully triggered : [website, unix-gpu]
@mxnet-bot run ci [centos-gpu]
Jenkins CI successfully triggered : [centos-gpu]
@mxnet-bot run ci [centos-gpu, unix-gpu, website]
Jenkins CI successfully triggered : [unix-gpu, centos-gpu, website]
@mxnet-bot run ci [centos-gpu, unix-gpu, website]
Jenkins CI successfully triggered : [unix-gpu, centos-gpu, website]
@mxnet-bot run ci [centos-gpu]
Jenkins CI successfully triggered : [centos-gpu]
@mxnet-bot run ci [website]
Jenkins CI successfully triggered : [website]