You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "haojin2 (GitHub)" <gi...@apache.org> on 2018/08/23 06:58:51 UTC
[GitHub] [incubator-mxnet] haojin2 opened pull request #12306:
SoftMin Operator
## Description ##
Support softmin function: https://pytorch.org/docs/master/_modules/torch/nn/functional.html#softmin
## Checklist ##
### Essentials ###
- [x] Changes are complete (i.e. I finished coding on this PR)
- [x] 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] Softmin operator
- [x] Corresponding unit tests
## Comments ##
Passed more than 10000 trials on both CPU & GPU:
```
MXNET_TEST_COUNT=10000 nosetests -s --verbose tests/python/unittest/test_operator.py:test_softmin
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=53121875 to reproduce.
test_operator.test_softmin ... ok
----------------------------------------------------------------------
Ran 1 test in 670.955s
OK
```
```
MXNET_TEST_COUNT=10000 nosetests -s --verbose tests/python/gpu/test_operator_gpu.py:test_softmin
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=207344053 to reproduce.
test_operator_gpu.test_softmin ... ok
----------------------------------------------------------------------
Ran 1 test in 946.723s
OK
```
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on issue #12306: SoftMin
Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
@szha
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] anirudhacharya commented on pull request
#12306: SoftMin Operator
Posted by "anirudhacharya (GitHub)" <gi...@apache.org>.
should there be a test for different dtypes
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on issue #12306: SoftMin
Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
The original softmax was not affected, tested with 10000 trials on both CPU & GPU:
```
MXNET_TEST_COUNT=10000 nosetests -s --verbose tests/python/unittest/test_operator.py:test_new_softmax
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=2100317665 to reproduce.
test_operator.test_new_softmax ... ok
----------------------------------------------------------------------
Ran 1 test in 669.569s
OK
```
```
MXNET_TEST_COUNT=10000 nosetests -s --verbose tests/python/gpu/test_operator_gpu.py:test_new_softmax
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=975663239 to reproduce.
test_operator_gpu.test_new_softmax ... ok
----------------------------------------------------------------------
Ran 1 test in 900.629s
OK
```
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on pull request #12306:
SoftMin Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
ok
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on pull request #12306:
SoftMin Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
Please read the doc carefully before you make a comment.
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on pull request #12306:
SoftMin Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
I can definitely add that
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] anirudhacharya commented on pull request
#12306: SoftMin Operator
Posted by "anirudhacharya (GitHub)" <gi...@apache.org>.
resolved offline to change it to softmin.
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on pull request #12306:
SoftMin Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
I just realized that checks for different dtypes are lacking in all of softmax-related tests, I'll add those checks for softmin only in this PR and submit another PR for adding those checks for other tests.
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] szha closed pull request #12306: SoftMin
Operator
Posted by "szha (GitHub)" <gi...@apache.org>.
[ pull request closed by szha ]
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on pull request #12306:
SoftMin Operator
Posted by "szha (GitHub)" <gi...@apache.org>.
formula needs correction
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 closed pull request #12306:
SoftMin Operator
Posted by "haojin2 (GitHub)" <gi...@apache.org>.
[ pull request closed by haojin2 ]
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-mxnet] anirudhacharya commented on pull request
#12306: SoftMin Operator
Posted by "anirudhacharya (GitHub)" <gi...@apache.org>.
Typo: this should be softmin
[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12306 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org