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

Conversation

@anirudhacharya
Copy link
Member

@anirudhacharya anirudhacharya commented Aug 26, 2018

Description

Add tests for uniform, normal and Xavier initializers.

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

Comments

@anirudhacharya anirudhacharya changed the title Add tests for initializers in R [MXNET-690] Add tests for initializers in R Aug 27, 2018

testthat("mx.init.internal.default", {
sample_bias <- mxnet:::mx.init.internal.default("X_bias", c(5, 10, 100),
ctx = mx.ctx.default())
Copy link
Contributor

Choose a reason for hiding this comment

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

Incorrect indent.

expect_equal(typeof(xavier_init), 'closure')

# default parameters
shape <- c(2, 3, 324, 324)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to pick 324?

Copy link
Member Author

Choose a reason for hiding this comment

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

no particular reason, I just did not want to pick a number too low that the test becomes flaky or too high that the test takes very long to execute. It was quite random

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. As long as it works.

@anirudhacharya
Copy link
Member Author

@hetong007 ran formatR on the whole tests folder

@hetong007
Copy link
Contributor

LGTM

@hetong007 hetong007 merged commit d234b32 into apache:master Aug 28, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Sep 19, 2018
* Add tests for intializer

* lint and indent
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants