You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/20 23:05:45 UTC

[GitHub] sandeep-krishnamurthy opened a new pull request #12625: [MXNET-979] [WIP] Add fix_beta support in BatchNorm

sandeep-krishnamurthy opened a new pull request #12625: [MXNET-979] [WIP] Add fix_beta support in BatchNorm
URL: https://github.com/apache/incubator-mxnet/pull/12625
 
 
   ## Description ##
   Current implementation of Batchnorm does not support ignoring the beta parameter. However, it does support fixing the gamma parameter via 'fix_gamma' boolean parameter, default to True.
   
   In this PR:
   1. Add new option in Batchnorm 'fix_beta' and update batchnorm operator to support ignoring the beta in forward and backward calculation.
   2. Gluon had a bug - Takes a boolean parameter 'center' and 'scale' where center=Beta and scale=Gamma. However, behind the scene it was ignoring 'center' parameter as symbolic API did not had that support. This PR fixes it to pass fix_beta param.
   
   Related issue - https://github.com/apache/incubator-mxnet/issues/11774
   This will also be useful in Keras-MXNet.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [X] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) 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)
   - [X] 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
   - [X] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [X] Support fix_beta in Batchnorm
   - [X] Support center=False in Gluon
   - [ ] Tests
   
   ## Comments ##
   Testing done:
   1. Tests are passing.
   2. Tested one end to end example - https://gluon.mxnet.io/chapter04_convolutional-neural-networks/cnn-batch-norm-gluon.html
   
   @roywei, @eric-haibin-lin - Can you please provide your initial comments? While, I work on GPU tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services