You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/25 01:50:06 UTC
[GitHub] reminisce opened a new pull request #7604: Refactor random linalg contrib namespaces
reminisce opened a new pull request #7604: Refactor random linalg contrib namespaces
URL: https://github.com/apache/incubator-mxnet/pull/7604
### What're included:
1. Added **contrib.py**, **linalg.py**, and **random.py** under the folders **python/mxnet/ndarray** and **python/mxnet/symbol** for registering ops of those categories.
2. Consolidated op registration functions: [_init_ndarray_module](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/ndarray/op.py#L174) and [_init_symbol_module](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/symbol/op.py#L206) into a single one [_init_op_module](https://github.com/apache/incubator-mxnet/compare/master...reminisce:refactor_random_linalg_contrib_namespaces?expand=1#diff-bdc88d735b5304ea6d327d5c0144b6efR381) in python/mxnet/base.py.
3. Changed to use the new namespace ops in all unit tests and examples.
### The ops under the newly added namespaces:
```python
>>> import mxnet as mx
>>> dir(mx.nd.contrib)
['CTCLoss', 'DeformableConvolution', 'DeformablePSROIPooling', 'MultiBoxDetection', 'MultiBoxPrior', 'MultiBoxTarget', 'MultiProposal', 'PSROIPooling', 'Proposal',..., 'count_sketch', 'ctc_loss', 'dequantize', 'fft', 'ifft', 'quantize']
>>> dir(mx.sym.contrib)
['CTCLoss', 'DeformableConvolution', 'DeformablePSROIPooling', 'MultiBoxDetection', 'MultiBoxPrior', 'MultiBoxTarget', 'MultiProposal', 'PSROIPooling', 'Proposal',..., 'count_sketch', 'ctc_loss', 'dequantize', 'fft', 'ifft', 'quantize']
>>> dir(mx.nd.random)
[..., 'exponential', 'gamma', 'generalized_negative_binomial', 'negative_binomial', 'normal', 'poisson', 'uniform']
>>> dir(mx.sym.random)
[..., 'exponential', 'gamma', 'generalized_negative_binomial', 'negative_binomial', 'normal', 'poisson', 'uniform']
>>> dir(mx.nd.linalg)
[..., 'gemm', 'gemm2', 'potrf', 'potri', 'sumlogdiag', 'trmm', 'trsm']
>>> dir(mx.sym.linalg)
[..., 'gemm', 'gemm2', 'potrf', 'potri', 'sumlogdiag', 'trmm', 'trsm']
```
### The following two namespaces are kept for backward compatibility.
```python
>>> dir(mx.contrib.sym)
['CTCLoss', 'DeformableConvolution', 'DeformablePSROIPooling', 'MultiBoxDetection', 'MultiBoxPrior', 'MultiBoxTarget', 'MultiProposal', 'PSROIPooling', 'Proposal',..., 'count_sketch', 'ctc_loss', 'dequantize', 'fft', 'ifft', 'quantize']
>>> dir(mx.contrib.nd)
['CTCLoss', 'DeformableConvolution', 'DeformablePSROIPooling', 'MultiBoxDetection', 'MultiBoxPrior', 'MultiBoxTarget', 'MultiProposal', 'PSROIPooling', 'Proposal',..., 'count_sketch', 'ctc_loss', 'dequantize', 'fft', 'ifft', 'quantize']
```
@piiswrong @eric-haibin-lin @szha
----------------------------------------------------------------
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