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

[MXNET-1414]fix gradient bug of boolean mask #15175

Merged
merged 1 commit into from
Jun 9, 2019

Conversation

wkcn
Copy link
Member

@wkcn wkcn commented Jun 7, 2019

Description

Related Issue: #15172

Hi, there.
The operator mx.nd.contrib.boolean_mask gives the wrong gradient.
I have fixed it and add a unittest.

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

  • Support Gradient Addition for boolean mask operator
  • Fix the gradient bug
  • Add a related unittest

Comment

In the CPU backward of boolean mask, it uses BooleanMaskBackwardCPUWriteKernel kernel to accelerate when req is WriteTo.

@wkcn wkcn changed the title fix graident bug of boolean mask fix gradient bug of boolean mask Jun 7, 2019
@wkcn wkcn changed the title fix gradient bug of boolean mask [MXNET-1414]fix gradient bug of boolean mask Jun 7, 2019
@wkcn wkcn added Bug Operator pr-awaiting-review PR is waiting for code review labels Jun 7, 2019
@wkcn wkcn requested a review from szha June 9, 2019 02:11
@wkcn
Copy link
Member Author

wkcn commented Jun 9, 2019

Hi, @szha, @eric-haibin-lin . Could you please help review this PR?
It is related to the feature of MXNet 1.5.0.
Thank you!

@wkcn wkcn requested a review from eric-haibin-lin June 9, 2019 02:26
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

It looks good on my side. @haojin2 Could you also take a look? Thanks!

@wkcn wkcn merged commit 8d8c5d5 into apache:master Jun 9, 2019
@wkcn
Copy link
Member Author

wkcn commented Jun 9, 2019

I have merged this PR. Thank you! @junrushao1994 @haojin2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Operator pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants