36 Commits
Author SHA1 Message Date
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
Amol Lele febbdd4dcd [MXNET-1121] Example to demonstrate the inference workflow using RNN (#13680)
* [MXNET-1121] Example to demonstrate the inference workflow using RNN

* Addressed the review comments. Updated the ReadMe files.

* Removed the unnecessary creation of NDArray

* Added the unit tests to nightly tests to catch the failure.

* Updated the makefiles and unit tests so that the examples are built and tested in nightly

* Added the visual representation of the model and fixed the CI failure.

* Added the missing pdf file.

* Fixing the broken ci_test.sh

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/README.md

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Update cpp-package/example/inference/simple_rnn.cpp

Co-Authored-By: leleamol <19983848+leleamol@users.noreply.github.com>

* Applying unresolved changes to README file.

* Fixing the CI build failure.

* Updated the RNN example from sequence generation to sentiment analysis

* Updated the readme files. Updated the example to use trained model and updated the unit test.

* Addressed the review comment to increase the default sequence length. Added the examples with inputs of various lengths.

* Updated the example to handle variable length input. Updated the readme and unit test files accordingly.

* Updated the example to share the memory between executors by createing shared executors.

* Updated the creation of executors from largest to smallest bucket key

* Creating the executor for the highest bucket key.

* Updated the unit test to check for the results in a range and modified the function name to be consistent with others.

* Fixed the logic to find the right bucket.
2019-02-07 09:40:38 -08:00
zhaoyao73 002e0bb08d Optimize C++ API (#13496)
* Optimize C++ API

Pass parameter with reference instead of value.
Add const as well as it is not changed.

* fix docs/architecture/overview.md

Fix BinaryShapeFunction typedef
Add a right brace for SmoothL1Shape_
2018-12-12 15:24:49 +01:00
Lai Wei ab712056b6 [Example] fix cpp example inception-bn and training acc issue (#13284)
* fix inception-bn and training acc issue

* add parameter initialization, fix lint

* fix comparison

* change optimizer to sgd

* update sgd and update model name

* add inception_bn in jenkins build

* make max epoch an argument

* remove inception_bn test

* trigger ci

* remove ci test

* trigger ci
2018-11-27 09:48:25 -08:00
Hao Jin 22bfbd7fc5 Add GetName function in Symbol class for cpp pack (#12076) 2018-08-09 10:58:32 -07:00
Rajan Singh ca08c1a7dc Added nullptr check for LeakyRelu gamma parameter. (#10886)
* Added nullptr checks for LeakyRelu gamma parameter.
It is used only for act type "prelu".
This fixes github issue:
https://github.com/apache/incubator-mxnet/issues/10885

*  Added mlp_cpu, mlp, mlp_gpu tests to CI tests.

* Enabling CI tests

* Fix file name
2018-05-11 11:51:53 -07:00
David Braude a157d17816 [MXNET-128] added load from buffer functions (#10261)
* rebased on master

* Update ndarray.h

* clairified comment

Mainly done to get to retest
2018-04-03 12:55:35 -07:00
chsin c153a6c789 comments to copy and copyto are corrected (#10040) 2018-03-09 00:06:17 -08:00
chsin 7a0509d6f5 fix optimizer bug in CPP-Package (#9809)
* opt register only once

* lint pass

* opt register only once

lint pass

* add test_optimizer.cpp

* fix warning

* typo
2018-02-27 12:05:57 -08:00
KarlFreecss d161818c35 Update shape.h (#9643)
In line 173 of ./cpp-package/include/mxnet-cpp/shape.h whether the num 5 is a error?
2018-01-31 09:02:17 -08:00
mbaijal 0319588190 Adding Apache Header to .m, .cfg, R and .mk files (#9499) 2018-01-21 19:43:46 -08:00
Yu-Xiang Wang 5251b86169 Signum optimizer (#9220)
* the c++ version of signum and signsgd optimizer

* optimizer signum, tested working with mac on cpuusing mnist

* unit test for signum

* fix lint and incorporate haibin's code review

* rerun jenkins

* adding link to the Loshachilov and Hutter to the documentation
2018-01-12 11:20:05 -08:00
Pedro Larroy 2d49d59cf1 Fix warnings on cpp-package (#9089)
* Fix warnings on cpp-package

* Make local symbols static in graph_executor
2018-01-10 11:34:00 -08:00
nihui 492a5fde03 add MSRAPrelu initializer for cpp-package (#9121)
* add MSRAPrelu initializer for cpp-package

hello, this change adds the MSRAPrelu initializer for cpp-package, which follows the python code
```
//     def __init__(self, factor_type="avg", slope=0.25):
//         magnitude = 2. / (1 + slope ** 2)
//         super(MSRAPrelu, self).__init__("gaussian", factor_type, magnitude)
//         self._kwargs = {'factor_type': factor_type, 'slope': slope}
```

* change indent

* declare explicit
2018-01-09 12:59:23 -08:00
Pedro Larroy 1c22bc7105 [clang][warning] fix warnings about braced initializer (fixes warning in concurrenc… (#8870)
* Fix warning on optimizer.h, MXNETCPP_REGISTER_OPTIMIZER return value not used

* remove unused variable cached_op

* [CMake] fix warnings about braced initializer
2017-12-08 17:02:45 -08:00
Kellen Sunderland d2a856a3a2 Restored some copyright attribution that were accidentally removed. (#8688)
* Revert "add"

This reverts commit b0fe391419bb49c7484ba04ee7171c42ae0e46d0.

* Adding Back the License Headers
2017-11-18 21:16:47 -08:00
Eric Junyuan Xie 0ad14b6037 Random refactor (#7939)
* random refactor

* fix

* fix

* fix

* fix
2017-09-26 13:39:24 -07:00
dtmoodie ec71cff6bc ndarray.hpp needs to include op.h (#7495)
* ndarray.hpp needs to include op.h

* op.h -> operator.h
2017-08-30 10:39:24 -07:00
dtmoodie 1e48e12386 gpu access of ndarray (#7496)
* gpu access of ndarray

* gpu access from C++ api

* gpu access fix

* Update c_api.cc

* Update c_api.cc
2017-08-26 11:51:34 -07:00
Xin Li 0a3ee080d9 Fix symbol load json (#6420) 2017-08-24 12:03:24 -07:00
lxn2 a5373e6af0 Add more license files (#7429)
* Add more licenses

* Revert "Add more licenses"

This reverts commit 8395a84d21a0cebaf909ec277b7b5d6feffa1412.

* Add license files
2017-08-11 14:12:47 -07:00
Mu Li 251ae71a20 Add license header (#7379)
* add

* add .py and ci

* fix pylint

* update
2017-08-08 16:36:23 -07:00
Sheng Zha c9aacaa7bf fix cpplint (#7332) 2017-08-04 10:12:31 -07:00
CNevd 76dee53dc4 [cpp-package] add lr scheduler (#6885)
* add lr scheduler

* Update lr_scheduler.h

* Update mlp_gpu.cpp

* Update test_score.cpp

* update optimizer.hpp
2017-08-03 13:18:07 -07:00
Eric Junyuan Xie ed190957bb Refactor Stateful operator and custom op (#6928)
* refactor create layer

* fix

* refactor custom op

* fix

* fix

* fix

* fix

* fix OpState

* remove superfluous infershape

* fix

* fix

* fix lint

* fix

* fix

* fix

* Update CMakeLists.txt

* delete

* fix

* fix scala
2017-07-12 10:04:40 -07:00
Sheng Zha 63ac793268 mod (#6698)
* mod

* fix include

* fix cpplint

* fix R

* fix cpp header

* return NAN instead of 0 and remove warning for mod

* fix cpp header

* fix build for half

* fix half

* fix half

* 0 grad for mod for now

* add override for half2

* fix half2_t

* updated backward

* fix registration

* mod, working backward compatible with numpy

* update mshadow

* fix lint

* fix half2 neg

* fix scala
2017-06-19 23:59:40 -07:00
vsooda 6b9afd8c6d fix member variable name: make them end with underline (#6438) 2017-05-25 12:45:25 -07:00
Madan Jampani 5de9bdf1b3 Fixing typos (#6414) 2017-05-23 20:46:07 -07:00
Xin Li 4544c5827f [cpp-package] Add monitor, optimizers, metrics and bug fixes (#6033)
* [cpp-package]Support MSVC and python 3

* Update docs

* [cpp-package]Add monitor

* Force UTF-8 encoding in MSVC

* [cpp-package] Automatically deploy the compiled library

* [cpp-package] Add RMSProp, Adam, AdaGrad, AdaDelta

* [cpp-package] Fix initializers

* Fix lint

* [cpp-package] Update Makefile

* [cpp-package] Fix constructor order

* Add MAE, MSE, PSNR metrics

* trigger op_map when loading symbols from file, to force ops to be initialized

* Add missing headers

* [cpp-package] Add inline to satisfy ODR

* Fix cuda compilation on windows

* [cpp-package] Update CMakeLists
2017-05-17 09:57:37 -07:00
Xin Li 517069c52c [cpp-package] Add C++ basic tutorial and build instruction (#5971)
* Add C++ basic tutorial and build instruction

* Remove binaries

* Fix lint

* Avoid sign-compare
2017-04-25 09:57:01 -07:00
Haibin Lin 53d3c63472 Add cpp_package build option in CI (#5844)
* add cpp_package build option in CI

* Change usage of Reshape in cpp-package
2017-04-17 20:56:08 -07:00
Patrick Hebron 5a14458528 Adds GetDType() signature to ndarray.h and fixes typo in implementation. (#5680) 2017-04-04 10:51:57 -07:00
Valentin Churavy 62d8a5bb84 fix NDArrayGetData to return to use the right datatype (#5629)
* fix NDArrayGetData to return to use the right datatype

* try to address C++ and Perl
2017-03-31 15:13:44 -07:00
Chris Olivier a5abd79c0b Caffe without the patch, cpp-package fixed also with Caffe plugin (#5573)
* PEP8 indentation fix

* Remove executable flag

* Remove executable flags

* Fixing cpp-package including problems with caffe converter

* Fix warnings

* Remove need for caffe patch for caffe plugin

* Ignore cmake paths, remove rebuildable op.h for cpp-package

* cpp-package examples fixed. Makefile and CMake of op.h and examples added.

* cpp-package examples fixed. Makefile and CMake of op.h and examples added.

* Fix source file

* Better example.mk

* Turn off caffe by default

* lint fixes

* Trying to figure out how to fix submodules

* nohub problem on travis so force retry

* Edited test to just run make instead of obsolete make example

* Fix cpp-package op.h bootstrapping with CMake

* Build tweaking cpp-package

* Lint fixes

* op.h generator

* FIx cpp-package for latest merge from master

* Fix lint

* static link

* link whole static lib

* Trigger another build attempt

* Trigger another build attempt

* Add caffe plugin support (disabled until dependencies can be added to build machine)

* Add cufft library

* win32 cufft library

* don't link unit tests as static

* Add include for rebuildable protobuf header caffe.pb.h
2017-03-30 20:13:36 -07:00
mingchuan 00b2b47f70 [cpp-package] Fix multiple definition issue (#5545)
* [cpp-package] Fix multiple definition issue

When mxnet hpp headers being included in different translation units,
link error occurs because there are multiple (duplicate) definition of
functions in different translation units.

This commit inlines mxnet cpp functions to follow the one definition rule.

* [cpp-package] Define KVStore as a singleton
2017-03-28 21:34:46 -07:00
Xin Li 21b2da07f6 Integrate cpp package (#5251)
* Copy mxnet.cpp to cpp-package sub directory

* Add missing type name declaration for nnvm::Tuple<dmlc::optional<int>>

* Add trigger to update operation wrapper in cpp package when building mxnet

* Add test to travis scripts

* Disable op generation on windows
2017-03-22 11:55:51 +08:00