1785 Commits
Author SHA1 Message Date
Przemyslaw Tredak 87441c3817 Add infer_type_partial (#14214)
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
2019-02-21 17:49:34 -08:00
Lai Wei fdbc433ffb fix update params (#14218) 2019-02-20 21:31:36 -08:00
Roshani Nagmote 0398a7ea33 onnx broadcast ops fixes (#13604)
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
2019-02-20 16:45:44 -08:00
Pedro Larroy 3a6fe22b66 Refine runtime feature discovery python API and add documentation to … (#14130)
* Refine runtime feature discovery python API and add documentation to Python API docs

* Fix lint

* Provide is_enabled method to check if feature is present from string

* Refine docs, add is_enabled

* Fix encoding

* Fix doc

* Address CR suggestions

* remove index as per CR suggestion

* Fix lint

* runtime

* Fix doc

* Add license
2019-02-18 11:29:47 -08:00
Dick Carter 5adb6fcfb3 Add NHWC layout support to Pooling (cpu, gpu cuda, gpu cuDNN) (#13749)
* Adds layout support: mx.sym.Pooling(..., layout='NHWC',...) with tests.

* Docs changes

* Trigger

* Skip NHWC pooling tests on non-cuDNN platforms

* Fix pylint NHWC pooling

* Fixes from review

* Add CuDNNPoolingOp::Supports() in place of Forward()/Backward() bool return.

* Add layout support to cpu implementation of Pooling, with tests.

* Fix cpplint.

* Fix bug in cpu nhwc impl.

* Add MXNet CUDA pooling in NWC, NHWC and NDHWC.  Turn on 3D cuDNN pooling.  Tests.

* Add PoolingParam::GetLayout() for better default layout handling.

* Fix cpplint.

* Throw exception for quantization pooling not NCHW.

* Expand nhwc pooling test coverage.

* SupportMKLDNNPooling() to examine layout param.

* Compare 'std' and 'v1' pooling versions only when op definitions permit.

* Add pooling test diagnostic output.

* Fix syntax.

* Fix pooling FInplaceOption so it can be shared by all implementations.

* Add missing param definition.

* Fix #if logic.

* Temp switch to DickJC123/mshadow: shows effect of half round-to-nearest on cpu.

* Move back to dmlc/mshadow.git, now with float->half rounding.

* Avoid underflow of lp pooling calc for dtype=float16.

* Remove redundant pooling test.

* Minor variable naming fixes.

* Modify FInplaceOption handling per reviewer comments.  Expand testing.

* Correct gluon Pooling layout param description.

* Correct Symbol Pooling description.

* Use 'CHECK(x)' rather than 'if (x) LOG(FATAL)'.

* Empty commit to trigger CI.
2019-02-16 15:17:33 -08:00
Da Zheng 4b527b681f [MXNET-766] add dynamic_unroll RNN for HybridBlock (#11948)
* add contrib unroll.

* reenable some tests.

* fix a bug.

* fix lint.

* fix a bug.

* support diff layouts.

* update doc.

* use a diff default layout.

* remove _contrib_format_sequence.

* fix lint.

* rename.
2019-02-15 18:23:01 -08:00
Anirudh a4e249bee2 In-place updates for Nadam, Adadelta, Adamax and SGLD (#13960) 2019-02-14 17:07:43 -08:00
Thomas Delteil 0e08891f85 Fix quote on LBSGD docs (#13975)
* change docs lbsgd

* fix more
2019-02-14 16:08:37 -08:00
Holger Kohr de5cda2714 Add pixelshuffle layers (#13571)
* Add pixelshuffle layers, closes #13548

* Remove fmt comments

* Use explicit class in super()

* Add axis swapping to pixel shuffling, add tests

* Add documentation to pixel shuffle layers

* Use pixelshuffle layer and fix download in superres example

* Add pixelshuffle layers to API doc page
2019-02-14 15:41:52 -08:00
Sheng Zha 6f9a679013 fix website build (#14148)
* fix rendering of markdown doc

* fix missing license from lipnet example
2019-02-13 16:24:22 -08:00
Yuxi Hu 0b1761ff11 Add pin_device_id option to Gluon DataLoader (#14136)
* add pin_device_id option to DataLoader

* add unit test to check output context

* trigger CI
2019-02-13 13:36:28 -08:00
Sheng Zha 199bc7eef6 make rat-excludes compliant with apache release policy (#14142)
* remove md from whitelist

* remove rst from whitelist

* remove docker folder from whitelist

* remove docs from whitelist
2019-02-13 10:12:12 -08:00
Vandana Kannan ce031daf5e ONNX export: Support equal length splits (#14121)
* ONNX export: Support equal length splits

* Fix lint error

* Add comment about checking for multiple outputs
2019-02-12 13:21:29 -08:00
Pedro Larroy f5ba7358d7 Addresses comments in runtime feature discovery API (#13964)
* Prototype for runtime feature detection

* Includes from diamond to quotes

* Add CPU feature and BLAS flavour flags

* Add BLAS flavour and CPU SSE and AVX flags

* MXNET_USE_LAPACK

* Fix C++ linting errors

* Expose runtime feature detection in the public C API and in the Python API

* Refactor Storage -> FeatureSet

* Refine documentation

* Add failure case

* Fix pylint

* Address CR comments

* Address CR comments

* Address CR

* Address CR

* Address CR

* Address CR

* remove old files

* Fix unit test

* Port CMake blas change from #13957

* Fix lint

* mxruntime -> libinfo

* Fix comments

* restore libinfo.py

* Rework API for feature detection / libinfo

* Refine documentation

* Fix lint

* Fix lint

* Define make_unique only for C++ std < 14

* Add memory include

* remove old tests

* make_unique fiasco

* Fix lint
2019-02-11 17:56:49 -08:00
Zhennan Qin 8b4a69aba8 [MKLDNN] Enable signed int8 support for convolution. (#13697)
* Enable s8s8 support for MKLDNN convolution.

* Fix cpp build

* Fix build.

* Fix build

* Remove openmp min/max reduction for windows build

* Add mkldnn_OIhw4i16o4i_s8s8 support

* Add all s8s8 weight format

* Change ssd quantize script.

* Update

* Manually cast mshadow shape size to size_t

* Fix merge.

* Fix perl package.

* Retrigger CI

* Fix GPU test

* Fix GPU test

* Rerun CI

* Rerun CI

* Rerun CI

* Rerun CI

* Remove weight_channelwise_scale from params.

* Fix

* Keep API compatible.

* Rerun CI

* Rerun CI

* Rerun CI

* Rerun CI

* Address comments.

* fix.

* Address debug build.

* Add comment for next_impl

* Rerun ci

* Add new api MXExecutorSetMonitorCallbackEX

* Add default value for monitor_all for cpp header.

* Rerun CI

* fix

* script change for uint8.

* trigger ci

* trigger ci
2019-02-10 21:18:00 +08:00
Roshani Nagmote ae997eb13e ONNX export: broadcast_to, tile ops (#13981)
* Expand,tile op export

* fix

* adding test cases

* adding comments
2019-02-05 11:18:41 -08:00
Sheng Zha 18b8704491 CUDNN dropout (#13896)
* cudnn dropout

* test dropout as stateful op

* add cudnn_off

* refactor

* fix bug when using inf forward

* turn on cudnn in gluon

* reuse dropout state space

* dropout passthrough

* address comments
2019-02-05 10:20:04 -08:00
Manu Seth 3f6778b0e8 modifying SyncBN doc for FP16 use case (#14041)
LGTM
2019-02-04 20:53:05 -08:00
Sandeep Krishnamurthy f86f21e083 Image ToTensor operator - GPU support, 3D/4D inputs (#13837)
* Add CPU implementation of ToTensor

* Add tests for cpu

* Add gpu implementation and tests

* Fix lint issues

* Cleanup includes

* Move back changes to original image operators files

* Add 4D example

* resolve merge conflicts

* Fix failing tests

* parallelize on channel in kernel launch
2019-02-04 14:59:13 -08:00
Jake Lee 2a4634b983 Export resize and support batch size (#14014)
* add image resize operator and unit test

* refactor the resize operator and address lint issues

* address comment and add doc

* assert size is more than 2

* add test case of 4D input

* use ndarray datatype

* add inline to Shape

* add 4D input example

* refactor the duplicate code and separate the resize from image_random

* clean up the code

* add resize implementation

* delete the variable not used

* refactor the code with structure and enum to make code more understandable

* fix the lint

* address comments

* address comment 1. add description 2. refactor unit test and add dtype

* update data type check

* lint

* move the common utitlity to image_utils

* add default value for keep_ratio

* change the operator doc

* update the image utility function

* fix lint

* use Hang implementation to achieve image resize operator GPU

* update the check and doc

* refactor the caffe_gpu_interp2_kernel

* update doc and fix the cpu compile error

* update the comment

* fix lint

* add unit test for gpu

* address comments

* remove the crop and centercop utility function to make the PR clear

* fix the syntax error

* delete the warning

* add unit test with 4D

* fix typo

* add more unit test

* fix unit test

* set atol = 1

* fix missing numpy import

* fix the unit test

* delete test case

* fix unit test missing dependency

* fix error data type

* unify the style and add invalid interp

* update the doc
2019-01-31 16:09:59 -08:00
Zach Boldyga e37ff53f0a Return value docs for nd.random.* and sym.random.* (#13994)
* mx.random.multinomial python documentation updated, return type details added

* multinomial documentation clarified

* added basic case for negative_binomial

* added basic case for generalized_negative_binomial

* basic case added for gamma

* added basic case for exponential

* basic case added for randn

* remaining base cases added.

* randint case added

* cleaned up return types for random.py

* zboldyga added to contributors

* spacing typo correction

* updated symbol.random return types, minor correction to ndarray.random return types

* removed trailing whitespace in docs
2019-01-29 17:54:57 -08:00
Sandeep Krishnamurthy 3a1a80a537 Image normalize operator - GPU support, 3D/4D inputs (#13802)
* CPU version of normalize operator is working and unit test added

* Add GPU implementation and tests

* Working GPU normalize transforms

* Add default values, fix imports, fix documentation

* Add backward implmentation for image normalize

* Add tests for backward pass

* Move back operators to its original files

* Add review comments

* Add 4D example

* Make infer type generic

* Fix inline function build error

* make functions as inline to avoid multiple definition conflict across cc and cu

* Fix build errors

* Fix failing GPU tests
2019-01-28 22:08:38 -08:00
stephenrawls da5242b732 MXNET-1295 Adding integer index support to Sequence* family of operators. (#13880)
* Adding integer index support to Sequence* family of operators.

Adding ability to use int32 arrays, or any castable-to-int type, as
the sequence_length array to SequenceMask, SequenceLast, and
SequenceReverse. Previously these operaters all requred sequence_length
to be the same data type as the input array.

See MxNet Jira ticket here:
  https://issues.apache.org/jira/browse/MXNET-1295

See also GitHub issues here:
   https://github.com/apache/incubator-mxnet/issues/12649
   https://github.com/dmlc/gluon-nlp/issues/346

* Adding explicit braces to an if statement to fix g++ warning

* fixing sequence_mask.cu by adding IType to template

* Fixing whitespace errors reported by linter

* Adding unit tests

* Fixing length of lines to pass linter
2019-01-26 22:04:09 -08:00
slyforce bc98c0d036 Python BucketingModule bind() with grad_req = 'add' (#13984)
* remember grad_req from bind and apply it to sub-modules

* unit-test for gradient accumulation with bucketing modules
2019-01-26 21:37:50 -08:00
vlado 28c20fb6c1 Sample python bilinear initializer at integral points in y-direction (#12983)
* Sample python bilinear initializer at integral points in y-direction

* Add unit test for bilinear initializer
2019-01-25 16:54:10 -08:00
Przemyslaw Tredak 25e915bd40 ONNX export: Add Crop, Deconvolution and fix the default stride of Pooling to 1 (#12399)
* Added Deconvolution and Crop to ONNX exporter

* Added default for pool_type
2019-01-25 16:04:56 -08:00
Sina Afrooze b30fba6ddb Fixing the doc for symbolic version of rand_zipfian (#13978)
* Fixes #12779
2019-01-24 10:45:20 -08:00
Przemyslaw Tredak 0a45e1a222 Aggregate SGD (#13346)
* Aggregate SGD

* Make OpWrapperGenerator understand Tuple<float>

* Trigger

* Add NNVM Tuple to cpp-package op.h

* Trigger

* Fix pylint aggregate SGD

* Update info about new ENV vars and modifying 2 tests that require
update_on_kvstore to be true

* Fix

* Aggregate SGD support for Gluon trainer

* Added text to doc about aggregate update in SGD optimizer

* Docs changes from review
2019-01-23 22:32:31 -08:00
HyperZealot 45d1a1e6ff split_v2 (#13687) 2019-01-23 13:09:33 -08:00
Pedro Larroy 692a24a041 Runtime feature detection (#13549)
* Prototype for runtime feature detection

* Includes from diamond to quotes

* Add CPU feature and BLAS flavour flags

* Add BLAS flavour and CPU SSE and AVX flags

* MXNET_USE_LAPACK

* Fix C++ linting errors

* Expose runtime feature detection in the public C API and in the Python API

* Refactor Storage -> FeatureSet

* Refine documentation

* Add failure case

* Fix pylint

* Address CR comments
2019-01-21 07:45:07 -08:00
solin319 93146890e7 fix bug in nag optimizer (#13683)
* fix bug in nag optimizer

```
grad += wd * weight
mom[:] += grad
grad[:] += self.momentum * mom
weight[:] += -lr * grad
```
This will minus wd*weight twice, but in`state = momentum * state + grad + wd * weight   weight = weight - (lr * (grad + momentum * state)) ` only minus once.

* fix bug in nag test

fix bug in nag test

* rewrite nag test

* rewrite nag

* fix nag with in-place operations

* fix nag with in-place operations
2019-01-16 12:16:21 -08:00
WANG Lei 5b011b38ff Fix the order of error term's operands (#13745)
* fix the order of error term's operands

* address comments
2019-01-15 22:41:58 -08:00
Roshani Nagmote d973ed45c5 onnx export ops (#13821)
* onnx export ops

* retrigger ci

* retrigger ci

* fix
2019-01-10 11:57:25 -08:00
Vandana Kannan 70316d6f45 [MXNET-880] ONNX export: Random uniform, Random normal, MaxRoiPool (#13676)
* ONNX export: Random uniform, Random normal

* ONNX export: MaxRoiPool

* tests for maxroipool, randomnormal, randomuniform
2019-01-10 11:09:09 -08:00
Roshani Nagmote bc391839b2 ONNX ops: norm exported and lpnormalization imported (#13806)
* ReduceL1, l2 export, lpnormalization import added

* fix

* fix

* fix

* fix
2019-01-09 19:46:32 -08:00
Roshani Nagmote ed92b8d620 fix for params with no dims in onnx (#13413)
* fix for params with no dims

* fix

* fix

* retrigger build

* test added

* retrigger CI

* retrigger ci
2019-01-09 14:49:10 -08:00
Vandana Kannan 240f7ed682 [MXNET-898] ONNX import/export: Sample_multinomial, ONNX export: GlobalLpPool, LpPool (#13500)
* ONNX import/export: Sample_multinomial

* ONNX export: GlobalLpPool, LpPool

* Handle default p_value

* Add tests for multinomial, lppool, globallppool

* add a comment about shape test
2019-01-09 09:42:27 -08:00
Haibin Lin 6a4bac6a96 Update Adam optimizer documentation (#13754) 2019-01-04 13:19:53 -08:00
Haibin Lin 812b06a4f2 Reorder module import orders for dist-kvstore (#13742)
* Reorder module import orders for dist-kvstore

* more code comments
2018-12-29 15:26:22 -08:00
Haibin Lin 33cd0af0d0 Fixes for trainer with update_on_kvstore=False (#13721)
* add clarification for param_dict

* more tests for dist kvstore

* more unittests

* fix a bug

* more dist exception test

* revert optimizer list

* fix bug and comment

* fix doc rendering and lint

* add invalid sched test

* fix website

* trigger

* update doc
2018-12-29 13:10:41 -08:00
vdantu 9fbd7dd26c gluon docfix (#13631) 2018-12-29 11:17:12 -08:00
Vandana Kannan 991bf3b64f ONNX import: Hardmax (#13717)
* ONNX import: Hardmax

* Fix lint errors

* add github link for issue with reshape
2018-12-29 08:39:42 -08:00
Haibin Lin 8132a5bd1f Update basic_layers.py (#13732) 2018-12-29 08:30:12 -08:00
Vandana Kannan be3d94520d ONNX import/export: Add missing tests, ONNX export: LogSoftMax (#13654)
* Logsoftmax, missing tests

* Support multiple outputs in Gluon backendrep

* Remove repeated unsqueeze test

* Allow multiple output support
2018-12-28 12:42:28 -08:00
Vandana Kannan a4f2ed5675 ONNX export: Add Flatten before Gemm (#13356)
* Add Flatten before Gemm

* ONNX export test: Allow multiple inputs in forward pass

* ONNX export: Test for fully connected
2018-12-20 22:17:05 +01:00
Joshua Z. Zhang 61744b5009 fix unpicklable transform_first on windows (#13686) 2018-12-19 11:10:33 -08:00
Aaron Markham 67a9a814d0 turn on Sphinx warnings as errors (#13544)
* turn on warnings as errors

* move warnings as error logic to build_all_version

* fix typo in comment

* add warning as error option for docs pipeline

* bump ci to test again; use this chance to add notes on this feature

* fix bugs in image.py docs
2018-12-18 09:02:02 -08:00
Joshua Z. Zhang b9b038f9b0 Complimentary gluon DataLoader improvements (#13606)
* init

* add tests

* doc

* lint

* fix openmp
2018-12-14 10:16:32 -08:00
Przemyslaw Tredak 98750fecad Optimization of metric evaluation (#13471)
* Change argsort to argpartition

* Global statistics in metrics

* Fix lint

* Fixes from review

* Trigger

* Fixes from review, fix to F1, MCC and perplexity metrics,
added test for global stats

* Fix lint

* Fix compatibility with Python 2
2018-12-13 15:56:32 -08:00
Terrorblade afb670353c Fix the bug of BidirectionalCell (#13575)
* Fix the bug of BidirectionalCell

I did hybridize( ) and pass "valid_length" to the unroll( ) function of BidirectionalCell, then returned AssertionError in line 79. Because symbol.split( ) return a symbol but not a symbol list. Result in the length of inputs dont equal parameter "length"  when call unroll( )  to compute r_outputs and r_states.

* add a test for BidirectionalCell

* Fix the bug of BidirectionalCell

I did hybridize( ) and pass "valid_length" to the unroll( ) function of BidirectionalCell, then returned AssertionError in line 79. Because symbol.split( ) return a symbol but not a symbol list. Result in the length of inputs dont equal parameter "length"  when call unroll( )  to compute r_outputs and r_states.

* fix test_bidirectional_unroll_valid_length( )

Fix the error of parameter.

* Fix the bug of BidirectionalCell

I did hybridize( ) and pass "valid_length" to the unroll( ) function of BidirectionalCell, then returned AssertionError in line 79. Because symbol.split( ) return a symbol but not a symbol list. Result in the length of inputs dont equal parameter "length"  when call unroll( )  to compute r_outputs and r_states.

* fix test_bidirectional_unroll_valid_length( )
2018-12-12 21:41:44 -08:00