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

avoid test relu at the origin due to discontinuous gradient #16133

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

ElaineBao
Copy link
Contributor

@ElaineBao ElaineBao commented Sep 10, 2019

Description

For relu, if an input is very close to the origin, numeric gradient cannot be compute due to discontinuous gradient at the origin. In order to avoid this test case, we replace small problematic inputs with 1.0.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • 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

  • Fix test case of MKLDNN relu

Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

Copy link
Member

@wkcn wkcn left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@wkcn wkcn added the pr-awaiting-merge Review and CI is complete. Ready to Merge label Sep 10, 2019
@wkcn wkcn merged commit ccd24a8 into apache:master Sep 12, 2019
@wkcn
Copy link
Member

wkcn commented Sep 12, 2019

Merged. Thank you : )

larroy pushed a commit to larroy/mxnet that referenced this pull request Sep 28, 2019
…6133)

* avoid test relu at the origin due to discontinuous gradient

* retrigger CI
@ElaineBao ElaineBao deleted the relu_test_case branch April 14, 2020 00:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
MKLDNN pr-awaiting-merge Review and CI is complete. Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants