You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by cj...@apache.org on 2017/11/30 00:16:55 UTC
[incubator-mxnet] branch v1.0.0 updated: License fixes (#8873)
This is an automated email from the ASF dual-hosted git repository.
cjolivier01 pushed a commit to branch v1.0.0
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.0.0 by this push:
new 4306d43 License fixes (#8873)
4306d43 is described below
commit 4306d43a5bf65cb5bcbd02619a6dba787b5e2350
Author: Chris Olivier <cj...@gmail.com>
AuthorDate: Wed Nov 29 16:16:50 2017 -0800
License fixes (#8873)
* Add nnvm commit tag to current master to get rid of jar file
* Add license for tvm and its dependencies
* License headers
* Remove licnese from FindJEMalloc.cmake
* fix commits for submodules
* ignore FindJeMalloc.cmake
* Add Apache license headers to R files
* Apache license for matlab files
* Add jquery license
* Remove CODEOWNERS
* Re-add executable flag to sh files
* Trigger build
* Trigger build
* Revert "Remove CODEOWNERS"
This reverts commit 911d402e250cd98b84ab7c41e506d3e035f83e55.
* Remove Apache header
* ignore FindJeMalloc.cmake
* [MERGE into v1.0.0 ONLY] Fix license for 1.0.0 (#8876)
* Remove ASF Licenses from some files
* typo
* typo 2
* whitelisting files for header check
---
CONTRIBUTORS.md | 2 +
LICENSE | 12 +-
amalgamation/prep_nnvm.sh | 16 +++
cmake/Modules/FindJeMalloc.cmake | 24 ----
docker/run.sh | 0
docs/_static/cn.svg | 20 +++
docs/_static/js/auto_module_index.js | 21 ++-
docs/_static/js/clipboard.min.js | 21 ++-
docs/_static/js/copycode.js | 19 +++
docs/_static/js/navbar.js | 21 ++-
docs/_static/js/options.js | 19 +++
docs/_static/js/page.js | 21 ++-
docs/_static/js/search.js | 21 ++-
docs/_static/js/sidebar.js | 21 ++-
docs/_static/mxnet-theme/footer.html | 21 ++-
docs/_static/mxnet-theme/index.html | 19 +++
docs/_static/mxnet-theme/layout.html | 19 +++
docs/_static/mxnet-theme/navbar.html | 19 +++
docs/_static/mxnet.css | 19 +++
docs/_static/searchtools_custom.js | 6 +-
docs/_static/selectlang.js | 21 ++-
docs/_static/us.svg | 20 +++
example/rnn/bucket_R/aclImdb_lstm_classification.R | 33 +++--
example/rnn/bucket_R/data_preprocessing.R | 81 +++++++-----
.../rnn/bucket_R/data_preprocessing_seq_to_one.R | 103 ++++++++-------
example/rnn/bucket_R/gru.cell.R | 61 +++++----
example/rnn/bucket_R/lstm.cell.R | 45 +++++--
example/rnn/bucket_R/mx.io.bucket.iter.R | 39 ++++--
example/rnn/bucket_R/rnn.R | 143 ++++++++++++---------
example/rnn/bucket_R/rnn.infer.R | 61 +++++----
example/rnn/bucket_R/rnn.train.R | 93 ++++++++------
example/speech_recognition/flac_to_wav.sh | 0
example/ssd/tools/prepare_coco.sh | 0
example/ssd/tools/prepare_pascal.sh | 0
matlab/+mxnet/model.m | 18 +++
matlab/+mxnet/private/callmxnet.m | 20 ++-
matlab/+mxnet/private/parse_json.m | 20 ++-
matlab/demo.m | 18 +++
matlab/tests/prepare_data.m | 18 +++
matlab/tests/test_prediction.m | 18 +++
nnvm | 2 +-
scala-package/assembly/linux-x86_64-cpu/pom.xml | 20 +++
.../src/main/assembly/assembly.xml | 20 +++
scala-package/assembly/linux-x86_64-gpu/pom.xml | 20 +++
.../src/main/assembly/assembly.xml | 20 +++
.../osx-x86_64-cpu/main/assembly/assembly.xml | 20 +++
scala-package/assembly/osx-x86_64-cpu/pom.xml | 20 +++
.../osx-x86_64-cpu/src/main/assembly/assembly.xml | 20 +++
scala-package/assembly/pom.xml | 20 +++
scala-package/core/pom.xml | 20 +++
.../core/src/test/resources/log4j.properties | 17 +++
scala-package/examples/pom.xml | 20 +++
.../examples/scripts/customop/run_customop.sh | 0
.../scripts/customop/run_customopwithrtc.sh | 0
.../scripts/module/run_sequential_module.sh | 0
.../neuralstyle_end2end/run_test_end2end.sh | 0
.../neuralstyle_end2end/run_train_end2end.sh | 0
.../scripts/profiler/run_profiler_matmul.sh | 0
.../scripts/profiler/run_profiler_ndarray.sh | 0
.../examples/scripts/rnn/run_lstm_bucketing.sh | 0
.../examples/scripts/rnn/run_test_charrnn.sh | 0
.../examples/scripts/run_cnntextclassification.sh | 0
scala-package/examples/scripts/run_gan_mnist.sh | 0
scala-package/examples/scripts/run_multitask.sh | 0
scala-package/examples/scripts/run_neuralstyle.sh | 0
.../examples/scripts/run_visualization.sh | 0
.../examples/src/main/resources/log4j.properties | 17 +++
scala-package/init-native/linux-x86_64/pom.xml | 20 +++
scala-package/init-native/osx-x86_64/pom.xml | 20 +++
scala-package/init-native/pom.xml | 20 +++
scala-package/init/pom.xml | 20 +++
scala-package/macros/pom.xml | 20 +++
scala-package/native/linux-x86_64-cpu/pom.xml | 20 +++
scala-package/native/linux-x86_64-gpu/pom.xml | 20 +++
scala-package/native/osx-x86_64-cpu/pom.xml | 20 +++
scala-package/native/pom.xml | 20 +++
scala-package/spark/pom.xml | 20 +++
setup-utils/install-mxnet-amz-linux.sh | 0
setup-utils/install-mxnet-fedora-python.sh | 0
setup-utils/install-mxnet-ubuntu-python.sh | 0
setup-utils/install-mxnet-ubuntu-r.sh | 0
src/nnvm/legacy_json_util.cc | 19 +++
src/nnvm/legacy_op_util.cc | 19 +++
.../contrib/moderngpu/include/mgpuenums.h | 19 +++
.../contrib/moderngpu/include/util/static.h | 19 +++
src/operator/contrib/ctc_include/detail/cpu_ctc.h | 19 +++
.../contrib/ctc_include/detail/ctc_helper.h | 19 +++
src/operator/contrib/ctc_include/detail/gpu_ctc.h | 19 +++
.../contrib/ctc_include/detail/gpu_ctc_kernels.h | 19 +++
.../contrib/ctc_include/detail/hostdevice.h | 19 +++
tests/ci_build/install/install_julia.sh | 0
tests/ci_build/install/install_library.sh | 0
tests/ci_build/install/install_maven.sh | 0
tests/ci_build/install/install_openblas.sh | 0
tests/ci_build/install/install_opencv.sh | 0
tests/ci_build/install/install_python2.sh | 0
tests/ci_build/install/install_python3.sh | 0
tests/ci_build/install/install_testdeps.sh | 0
tests/jenkins/set_user_permissions.sh | 0
.../compilation_warnings/compilation_warnings.sh | 0
tests/nightly/download.sh | 0
tests/nightly/sh2ju.sh | 0
tests/travis/r_vignettes.R | 17 +++
tools/license_header.py | 4 +-
104 files changed, 1485 insertions(+), 296 deletions(-)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 7847a5e..64cd29d 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -7,6 +7,7 @@ Committers
----------
Committers are people who have made substantial contribution to the project and being active.
The committers are the granted write access to the project.
+A full list of committers can be found here: http://incubator.apache.org/projects/mxnet.html
* [Bing Xu](https://github.com/antinucleon)
- Bing is the initiator and major contributor of operators and ndarray modules of mxnet.
@@ -39,6 +40,7 @@ The committers are the granted write access to the project.
- Zixuan is one of major maintainers of mxnet scala package.
* [Yuan Tang](https://github.com/terrytangyuan)
- Yuan is one of major maintainers of mxnet scala package.
+* [Chris Olivier](https://github.com/cjolivier01)
### Become a Committer
MXNet is a opensource project and we are actively looking for new committers
diff --git a/LICENSE b/LICENSE
index adbbbb7..ca78bc0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -96,6 +96,7 @@
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
+
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
@@ -224,8 +225,10 @@
7. mshadow - For details, see, mshadow/LICENSE
8. nnvm/dmlc-core - For details, see, nnvm/dmlc-core/LICENSE
9. nnvm - For details, see, nnvm/LICENSE
- 10. nnvm-fusion - For details, see, nnvm/plugin/nnvm-fusion/LICENSE
- 11. ps-lite - For details, see, ps-lite/LICENSE
+ 10. nnvm/tvm - For details, see, nnvm/tvm/LICENSE
+ 11. nnvm/tvm/HalideIR/LICENSE - For details, see, nnvm/tvm/HalideIR/LICENSE
+ 12. nnvm-fusion - For details, see, nnvm/plugin/nnvm-fusion/LICENSE
+ 13. ps-lite - For details, see, ps-lite/LICENSE
========================================================================
MIT licenses
@@ -234,7 +237,7 @@
1. Fast R-CNN - For details, see example/rcnn/LICENSE
2. Faster R-CNN - For details, see example/rcnn/LICENSE
3. tree_lstm - For details, see example/gluon/tree_lstm/LICENSE
-
+ 4. JQuery - For details, see http://jquery.org/license
========================================================================
NVIDIA Licenses
@@ -350,7 +353,8 @@
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF TH
+E USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
diff --git a/amalgamation/prep_nnvm.sh b/amalgamation/prep_nnvm.sh
index baf6d4d..60c9674 100755
--- a/amalgamation/prep_nnvm.sh
+++ b/amalgamation/prep_nnvm.sh
@@ -1,4 +1,20 @@
#! /bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
DMLC_CORE=$(pwd)/../dmlc-core
cd ../nnvm/amalgamation
make clean
diff --git a/cmake/Modules/FindJeMalloc.cmake b/cmake/Modules/FindJeMalloc.cmake
index f3ca06f..0ab1cec 100644
--- a/cmake/Modules/FindJeMalloc.cmake
+++ b/cmake/Modules/FindJeMalloc.cmake
@@ -1,27 +1,3 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-# Copyright (c) 2014 Thomas Heller
-# Copyright (c) 2007-2012 Hartmut Kaiser
-# Copyright (c) 2010-2011 Matt Anderson
-# Copyright (c) 2011 Bryce Lelbach
-#
-#----
# Distributed under the Boost Software License, Version 1.0.
# Boost Software License - Version 1.0 - August 17th, 2003
#
diff --git a/docker/run.sh b/docker/run.sh
old mode 100644
new mode 100755
diff --git a/docs/_static/cn.svg b/docs/_static/cn.svg
index 515176d..9fb3fc0 100644
--- a/docs/_static/cn.svg
+++ b/docs/_static/cn.svg
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="640" height="480" viewBox="-5 -5 12.8 9.6">
<title>
Flag of the People's Republic of China
diff --git a/docs/_static/js/auto_module_index.js b/docs/_static/js/auto_module_index.js
index 7f4e185..83bdbf3 100644
--- a/docs/_static/js/auto_module_index.js
+++ b/docs/_static/js/auto_module_index.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
function auto_index(module) {
$(document).ready(function () {
// find all classes or functions
@@ -21,4 +40,4 @@ function auto_index(module) {
html += "</ul>";
li_node.append(html);
});
-}
\ No newline at end of file
+}
diff --git a/docs/_static/js/clipboard.min.js b/docs/_static/js/clipboard.min.js
old mode 100755
new mode 100644
index 1993676..a23c4e1
--- a/docs/_static/js/clipboard.min.js
+++ b/docs/_static/js/clipboard.min.js
@@ -1,7 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*!
* clipboard.js v1.6.1
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,o){function i(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"' [...]
\ No newline at end of file
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,o){function i(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"' [...]
diff --git a/docs/_static/js/copycode.js b/docs/_static/js/copycode.js
index f9ebd64..b1c268c 100644
--- a/docs/_static/js/copycode.js
+++ b/docs/_static/js/copycode.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*Copy code to clipboard*/
LANG_GP = {'default':'>>> ', 'python':'>>> ' , 'scala':'scala>', 'julia':'julia> ', 'r':'> ', 'perl':'pdl>' , 'cpp':'', 'bash':'$ '};
diff --git a/docs/_static/js/navbar.js b/docs/_static/js/navbar.js
index ee011bd..e3601c4 100644
--- a/docs/_static/js/navbar.js
+++ b/docs/_static/js/navbar.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
var searchBox = $("#search-input-wrap");
var TITLE = ['/get_started/', '/tutorials/', '/gluon/' , '/api/', '/community/contribute.html', ];
var DOC_TITLE = ['/faq/', '/architecture/', '/model_zoo/'];
@@ -87,4 +106,4 @@ $(document).ready(function () {
if($("body").prop("clientWidth") < 1000 || $('div.sphinxsidebar').css('visibility') == 'hidden') $('div.content').css('width', '100%');
else $('div.content').css('width', 'calc(100% - 300px)');
});
-});
\ No newline at end of file
+});
diff --git a/docs/_static/js/options.js b/docs/_static/js/options.js
index 77ef940..6e285df 100644
--- a/docs/_static/js/options.js
+++ b/docs/_static/js/options.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
$(document).ready(function () {
function label(lbl) {
return lbl.replace(/[ .]/g, '-').toLowerCase();
diff --git a/docs/_static/js/page.js b/docs/_static/js/page.js
index 24fa215..9054bf4 100644
--- a/docs/_static/js/page.js
+++ b/docs/_static/js/page.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/* Generate url tracking for each page */
var protocol = location.protocol.concat("//");
var host = protocol.concat(window.location.host);
@@ -67,4 +86,4 @@ if ($('div.download-btn').length > 0) {
var footerHeight = 252;
if ($('div.content-block').height() > $(window).height() - footerHeight) {
$('div.footer').css('position', 'relative');
-}
\ No newline at end of file
+}
diff --git a/docs/_static/js/search.js b/docs/_static/js/search.js
index 9df9702..e9c6e84 100644
--- a/docs/_static/js/search.js
+++ b/docs/_static/js/search.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
$(document).ready(function () {
var searchForm = $("#search-input-wrap").children("form").first();
searchForm.append('<div class="form-group searchBtn"><input type="submit" class="form-control" value="Go"></div>');
@@ -16,4 +35,4 @@ $(document).ready(function () {
$('#searchIcon span').addClass('glyphicon-search');
}
});
-});
\ No newline at end of file
+});
diff --git a/docs/_static/js/sidebar.js b/docs/_static/js/sidebar.js
index 31e1450..890f8c3 100644
--- a/docs/_static/js/sidebar.js
+++ b/docs/_static/js/sidebar.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*Preprocess*/
var LANG = ['python', 'scala', 'r', 'julia', 'c++', 'perl'];
var TITLE_WITH_LANG = ['/get_started/', '/tutorials/', '/faq/', '/architecture/', '/community/'];
@@ -251,4 +270,4 @@ $(document).ready(function () {
if ($('div.sphinxsidebar').css('visibility') == 'hidden') $('.content').css('width', '100%');
return;
}
-});
\ No newline at end of file
+});
diff --git a/docs/_static/mxnet-theme/footer.html b/docs/_static/mxnet-theme/footer.html
index c5ac70e..76d694e 100644
--- a/docs/_static/mxnet-theme/footer.html
+++ b/docs/_static/mxnet-theme/footer.html
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<div class="footer">
<div class="section-disclaimer">
<div class="container">
@@ -13,4 +32,4 @@
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/docs/_static/mxnet-theme/index.html b/docs/_static/mxnet-theme/index.html
index da5cea6..40bd6df 100644
--- a/docs/_static/mxnet-theme/index.html
+++ b/docs/_static/mxnet-theme/index.html
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<div id="splash">
<div class="container">
<div class="row">
diff --git a/docs/_static/mxnet-theme/layout.html b/docs/_static/mxnet-theme/layout.html
index b776117..3d5df27 100644
--- a/docs/_static/mxnet-theme/layout.html
+++ b/docs/_static/mxnet-theme/layout.html
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}
diff --git a/docs/_static/mxnet-theme/navbar.html b/docs/_static/mxnet-theme/navbar.html
index e5619f1..fc483f8 100644
--- a/docs/_static/mxnet-theme/navbar.html
+++ b/docs/_static/mxnet-theme/navbar.html
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<div class="navbar navbar-fixed-top">
<div class="container" id="navContainer">
<div id="header-inner" class="innder">
diff --git a/docs/_static/mxnet.css b/docs/_static/mxnet.css
index 1f97f9e..fec4e45 100644
--- a/docs/_static/mxnet.css
+++ b/docs/_static/mxnet.css
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*-------------------- AmazonEmber font -----------------------------------*/
@font-face {
font-family: AmazonEmber;
diff --git a/docs/_static/searchtools_custom.js b/docs/_static/searchtools_custom.js
index 42c4493..fe1e621 100644
--- a/docs/_static/searchtools_custom.js
+++ b/docs/_static/searchtools_custom.js
@@ -8,14 +8,14 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/docs/_static/selectlang.js b/docs/_static/selectlang.js
index 25337ab..86fbd10 100644
--- a/docs/_static/selectlang.js
+++ b/docs/_static/selectlang.js
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
function changeLanguage(langSelect, langSelectLabel, rootpath){
langSelect.change(function() {
var lang = langSelect.val();
@@ -22,4 +41,4 @@ $(document).ready(function () {
langSelectLabel.text($("option:selected").text());
changeLanguage(langSelect, langSelectLabel, getRootPath());
-})
\ No newline at end of file
+})
diff --git a/docs/_static/us.svg b/docs/_static/us.svg
index 1d621f9..f410544 100644
--- a/docs/_static/us.svg
+++ b/docs/_static/us.svg
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<svg id="svg153" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="480" width="640" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata id="metadata3151">
<rdf:RDF>
diff --git a/example/rnn/bucket_R/aclImdb_lstm_classification.R b/example/rnn/bucket_R/aclImdb_lstm_classification.R
index bb5eaac..27fe000 100644
--- a/example/rnn/bucket_R/aclImdb_lstm_classification.R
+++ b/example/rnn/bucket_R/aclImdb_lstm_classification.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
require("mxnet")
source("mx.io.bucket.iter.R")
@@ -13,21 +30,21 @@ batch.size <- 64
num.round <- 16
-train.data <- mx.io.bucket.iter(buckets = corpus_bucketed_train$buckets, batch.size = batch.size,
+train.data <- mx.io.bucket.iter(buckets = corpus_bucketed_train$buckets, batch.size = batch.size,
data.mask.element = 0, shuffle = TRUE)
-eval.data <- mx.io.bucket.iter(buckets = corpus_bucketed_test$buckets, batch.size = batch.size,
+eval.data <- mx.io.bucket.iter(buckets = corpus_bucketed_test$buckets, batch.size = batch.size,
data.mask.element = 0, shuffle = FALSE)
mx.set.seed(0)
-optimizer <- mx.opt.create("adadelta", rho = 0.92, epsilon = 1e-06, wd = 2e-04, clip_gradient = NULL,
+optimizer <- mx.opt.create("adadelta", rho = 0.92, epsilon = 1e-06, wd = 2e-04, clip_gradient = NULL,
rescale.grad = 1/batch.size)
-model_sentiment_lstm <- mx.rnn.buckets(train.data = train.data, begin.round = 1,
- num.round = num.round, ctx = mx.cpu(), metric = mx.metric.accuracy, optimizer = optimizer,
- num.rnn.layer = 2, num.embed = 16, num.hidden = 24, num.label = 2, input.size = vocab,
- initializer = mx.init.Xavier(rnd_type = "gaussian", factor_type = "in", magnitude = 2),
- dropout = 0.25, config = "seq-to-one", batch.end.callback = mx.callback.log.train.metric(period = 50),
+model_sentiment_lstm <- mx.rnn.buckets(train.data = train.data, begin.round = 1,
+ num.round = num.round, ctx = mx.cpu(), metric = mx.metric.accuracy, optimizer = optimizer,
+ num.rnn.layer = 2, num.embed = 16, num.hidden = 24, num.label = 2, input.size = vocab,
+ initializer = mx.init.Xavier(rnd_type = "gaussian", factor_type = "in", magnitude = 2),
+ dropout = 0.25, config = "seq-to-one", batch.end.callback = mx.callback.log.train.metric(period = 50),
verbose = TRUE)
mx.model.save(model_sentiment_lstm, prefix = "model_sentiment_lstm", iteration = num.round)
diff --git a/example/rnn/bucket_R/data_preprocessing.R b/example/rnn/bucket_R/data_preprocessing.R
index c91e3fb..9652077 100644
--- a/example/rnn/bucket_R/data_preprocessing.R
+++ b/example/rnn/bucket_R/data_preprocessing.R
@@ -1,6 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# download the IMDB dataset
if (!file.exists("aclImdb_v1.tar.gz")) {
- download.file("http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz",
+ download.file("http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz",
"aclImdb_v1.tar.gz")
untar("aclImdb_v1.tar.gz")
}
@@ -43,7 +60,7 @@ saveRDS(test_raw, file = "test_raw.rds")
text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
raw_vec <- corpus
raw_vec <- stri_enc_toascii(str = raw_vec)
-
+
### remove non-printable characters
raw_vec <- str_replace_all(string = raw_vec, pattern = "[^[:print:]]", replacement = "")
raw_vec <- str_to_lower(string = raw_vec)
@@ -51,12 +68,12 @@ text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
raw_vec <- str_replace_all(string = raw_vec, pattern = "\\bbr\\b", replacement = "")
raw_vec <- str_replace_all(string = raw_vec, pattern = "\\s+", replacement = " ")
raw_vec <- str_trim(string = raw_vec)
-
+
### Split raw sequence vectors into lists of word vectors (one list element per
### sequence)
- word_vec_list <- stri_split_boundaries(raw_vec, type = "word", skip_word_none = T,
+ word_vec_list <- stri_split_boundaries(raw_vec, type = "word", skip_word_none = T,
skip_word_number = F, simplify = F)
-
+
### Build vocabulary
if (is.null(dic)) {
word_vec_unlist <- unlist(word_vec_list)
@@ -66,79 +83,79 @@ text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
stopwords <- c(letters, "an", "the", "br")
word_keep <- setdiff(word_keep, stopwords)
} else word_keep <- names(dic)[!dic == 0]
-
+
### Clean the sentences to keep only the curated list of words
word_vec_list <- lapply(word_vec_list, function(x) x[x %in% word_keep])
-
+
# sentence_vec<- stri_split_boundaries(raw_vec, type='sentence', simplify = T)
word_vec_length <- lapply(word_vec_list, length) %>% unlist()
-
+
### Build dictionnary
dic <- 1:length(word_keep)
names(dic) <- word_keep
dic <- c(`¤` = 0, dic)
-
+
### reverse dictionnary
rev_dic <- names(dic)
names(rev_dic) <- dic
-
+
return(list(word_vec_list = word_vec_list, dic = dic, rev_dic = rev_dic))
}
-################################################################
+################################################################
make_bucket_data <- function(word_vec_list, labels, dic, seq_len = c(225), right_pad = T) {
### Trunc sequence to max bucket length
word_vec_list <- lapply(word_vec_list, head, n = max(seq_len))
-
+
word_vec_length <- lapply(word_vec_list, length) %>% unlist()
- bucketID <- cut(word_vec_length, breaks = c(0, seq_len, Inf), include.lowest = T,
+ bucketID <- cut(word_vec_length, breaks = c(0, seq_len, Inf), include.lowest = T,
labels = F)
# table(bucketID)
-
+
### Right or Left side Padding Pad sequences to their bucket length with
### dictionnary 0-label
word_vec_list_pad <- lapply(1:length(word_vec_list), function(x) {
length(word_vec_list[[x]]) <- seq_len[bucketID[x]]
word_vec_list[[x]][is.na(word_vec_list[[x]])] <- names(dic[1])
- if (right_pad == F)
+ if (right_pad == F)
word_vec_list[[x]] <- rev(word_vec_list[[x]])
return(word_vec_list[[x]])
})
-
+
### Assign sequences to buckets and unroll them in order to be reshaped into arrays
- unrolled_arrays <- lapply(1:length(seq_len), function(x) unlist(word_vec_list_pad[bucketID ==
+ unrolled_arrays <- lapply(1:length(seq_len), function(x) unlist(word_vec_list_pad[bucketID ==
x]))
-
+
### Assign labels to their buckets
bucketed_labels <- lapply(1:length(seq_len), function(x) labels[bucketID == x])
names(bucketed_labels) <- as.character(seq_len)
-
+
### Assign the dictionnary to each bucket terms
unrolled_arrays_dic <- lapply(1:length(seq_len), function(x) dic[unrolled_arrays[[x]]])
-
+
# length(splitted_arrays_dic[[1]]) Reshape into arrays having each sequence into
# a column
- features_arrays <- lapply(1:length(seq_len), function(x) array(unrolled_arrays_dic[[x]],
+ features_arrays <- lapply(1:length(seq_len), function(x) array(unrolled_arrays_dic[[x]],
dim = c(seq_len[x], length(unrolled_arrays_dic[[x]])/seq_len[x])))
-
- features <- lapply(1:length(seq_len), function(x) features_arrays[[x]][1:seq_len[x],
+
+ features <- lapply(1:length(seq_len), function(x) features_arrays[[x]][1:seq_len[x],
])
names(features) <- as.character(seq_len)
-
+
### Combine data and labels into buckets
- buckets <- lapply(1:length(seq_len), function(x) c(list(data = features[[x]]),
+ buckets <- lapply(1:length(seq_len), function(x) c(list(data = features[[x]]),
list(label = bucketed_labels[[x]])))
names(buckets) <- as.character(seq_len)
-
+
### reverse dictionnary
rev_dic <- names(dic)
names(rev_dic) <- dic
-
+
return(list(buckets = buckets, dic = dic, rev_dic = rev_dic))
}
-corpus_preprocessed_train <- text_pre_process(corpus = train_raw, count_threshold = 10,
+corpus_preprocessed_train <- text_pre_process(corpus = train_raw, count_threshold = 10,
dic = NULL)
# length(corpus_preprocessed_train$dic)
@@ -152,15 +169,15 @@ corpus_preprocessed_train <- readRDS(file = "corpus_preprocessed_train_10.rds")
corpus_preprocessed_test <- readRDS(file = "corpus_preprocessed_test_10.rds")
-corpus_bucketed_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
- labels = rep(0:1, each = 12500), dic = corpus_preprocessed_train$dic, seq_len = c(100,
+corpus_bucketed_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
+ labels = rep(0:1, each = 12500), dic = corpus_preprocessed_train$dic, seq_len = c(100,
200, 300, 500, 800), right_pad = F)
# lapply(corpus_bucketed_train$buckets, function(x) length(x[[2]]))
-corpus_bucketed_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
- labels = rep(0:1, each = 12500), dic = corpus_preprocessed_test$dic, seq_len = c(100,
+corpus_bucketed_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
+ labels = rep(0:1, each = 12500), dic = corpus_preprocessed_test$dic, seq_len = c(100,
200, 300, 500, 800), right_pad = F)
# lapply(corpus_bucketed_test$buckets, function(x) length(x[[2]]))
diff --git a/example/rnn/bucket_R/data_preprocessing_seq_to_one.R b/example/rnn/bucket_R/data_preprocessing_seq_to_one.R
index 11c0a0c..a7d73f0 100644
--- a/example/rnn/bucket_R/data_preprocessing_seq_to_one.R
+++ b/example/rnn/bucket_R/data_preprocessing_seq_to_one.R
@@ -1,6 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# download the IMDB dataset
if (!file.exists("data/aclImdb_v1.tar.gz")) {
- download.file("http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz",
+ download.file("http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz",
"data/aclImdb_v1.tar.gz")
untar("data/aclImdb_v1.tar.gz")
}
@@ -40,7 +57,7 @@ test_raw <- c(negative_test_raw, positive_test_raw)
text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
raw_vec <- corpus
raw_vec <- stri_enc_toascii(str = raw_vec)
-
+
### perform some preprocessing
raw_vec <- str_replace_all(string = raw_vec, pattern = "[^[:print:]]", replacement = "")
raw_vec <- str_to_lower(string = raw_vec)
@@ -48,12 +65,12 @@ text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
raw_vec <- str_replace_all(string = raw_vec, pattern = "\\bbr\\b", replacement = "")
raw_vec <- str_replace_all(string = raw_vec, pattern = "\\s+", replacement = " ")
raw_vec <- str_trim(string = raw_vec)
-
+
### Split raw sequence vectors into lists of word vectors (one list element per
### sequence)
- word_vec_list <- stri_split_boundaries(raw_vec, type = "word", skip_word_none = T,
+ word_vec_list <- stri_split_boundaries(raw_vec, type = "word", skip_word_none = T,
skip_word_number = F, simplify = F)
-
+
### Build vocabulary
if (is.null(dic)) {
word_vec_unlist <- unlist(word_vec_list)
@@ -63,77 +80,77 @@ text_pre_process <- function(corpus, count_threshold = 10, dic = NULL) {
stopwords <- c(letters, "an", "the", "br")
word_keep <- setdiff(word_keep, stopwords)
} else word_keep <- names(dic)[!dic == 0]
-
+
### Clean the sentences to keep only the curated list of words
word_vec_list <- lapply(word_vec_list, function(x) x[x %in% word_keep])
-
+
# sentence_vec<- stri_split_boundaries(raw_vec, type='sentence', simplify = T)
word_vec_length <- lapply(word_vec_list, length) %>% unlist()
-
+
### Build dictionnary
dic <- 1:length(word_keep)
names(dic) <- word_keep
dic <- c(`¤` = 0, dic)
-
+
### reverse dictionnary
rev_dic <- names(dic)
names(rev_dic) <- dic
-
+
return(list(word_vec_list = word_vec_list, dic = dic, rev_dic = rev_dic))
}
-################################################################
+################################################################
make_bucket_data <- function(word_vec_list, labels, dic, seq_len = c(225), right_pad = T) {
### Trunc sequence to max bucket length
word_vec_list <- lapply(word_vec_list, head, n = max(seq_len))
-
+
word_vec_length <- lapply(word_vec_list, length) %>% unlist()
- bucketID <- cut(word_vec_length, breaks = c(0, seq_len, Inf), include.lowest = T,
+ bucketID <- cut(word_vec_length, breaks = c(0, seq_len, Inf), include.lowest = T,
labels = F)
-
+
### Right or Left side Padding Pad sequences to their bucket length with
### dictionnary 0-label
word_vec_list_pad <- lapply(1:length(word_vec_list), function(x) {
length(word_vec_list[[x]]) <- seq_len[bucketID[x]]
word_vec_list[[x]][is.na(word_vec_list[[x]])] <- names(dic[1])
- if (right_pad == F)
+ if (right_pad == F)
word_vec_list[[x]] <- rev(word_vec_list[[x]])
return(word_vec_list[[x]])
})
-
+
### Assign sequences to buckets and unroll them in order to be reshaped into arrays
- unrolled_arrays <- lapply(1:length(seq_len), function(x) unlist(word_vec_list_pad[bucketID ==
+ unrolled_arrays <- lapply(1:length(seq_len), function(x) unlist(word_vec_list_pad[bucketID ==
x]))
-
+
### Assign labels to their buckets
bucketed_labels <- lapply(1:length(seq_len), function(x) labels[bucketID == x])
names(bucketed_labels) <- as.character(seq_len)
-
+
### Assign the dictionnary to each bucket terms
unrolled_arrays_dic <- lapply(1:length(seq_len), function(x) dic[unrolled_arrays[[x]]])
-
+
# Reshape into arrays having each sequence into a row
features <- lapply(1:length(seq_len), function(x) {
- t(array(unrolled_arrays_dic[[x]],
+ t(array(unrolled_arrays_dic[[x]],
dim = c(seq_len[x], length(unrolled_arrays_dic[[x]])/seq_len[x])))
})
-
+
names(features) <- as.character(seq_len)
-
+
### Combine data and labels into buckets
- buckets <- lapply(1:length(seq_len), function(x) c(list(data = features[[x]]),
+ buckets <- lapply(1:length(seq_len), function(x) c(list(data = features[[x]]),
list(label = bucketed_labels[[x]])))
names(buckets) <- as.character(seq_len)
-
+
### reverse dictionnary
rev_dic <- names(dic)
names(rev_dic) <- dic
-
+
return(list(buckets = buckets, dic = dic, rev_dic = rev_dic))
}
-corpus_preprocessed_train <- text_pre_process(corpus = train_raw, count_threshold = 10,
+corpus_preprocessed_train <- text_pre_process(corpus = train_raw, count_threshold = 10,
dic = NULL)
corpus_preprocessed_test <- text_pre_process(corpus = test_raw, dic = corpus_preprocessed_train$dic)
@@ -143,16 +160,16 @@ quantile(seq_length_dist, 0:20/20)
# Save bucketed corpus
-corpus_bucketed_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
- labels = rep(0:1, each = 12500),
- dic = corpus_preprocessed_train$dic,
- seq_len = c(100, 150, 250, 400, 600),
+corpus_bucketed_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
+ labels = rep(0:1, each = 12500),
+ dic = corpus_preprocessed_train$dic,
+ seq_len = c(100, 150, 250, 400, 600),
right_pad = T)
-corpus_bucketed_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
- labels = rep(0:1, each = 12500),
- dic = corpus_preprocessed_test$dic,
- seq_len = c(100, 150, 250, 400, 600),
+corpus_bucketed_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
+ labels = rep(0:1, each = 12500),
+ dic = corpus_preprocessed_test$dic,
+ seq_len = c(100, 150, 250, 400, 600),
right_pad = T)
saveRDS(corpus_bucketed_train, file = "data/corpus_bucketed_train.rds")
@@ -160,16 +177,16 @@ saveRDS(corpus_bucketed_test, file = "data/corpus_bucketed_test.rds")
# Save non bucketed corpus
-corpus_single_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
- labels = rep(0:1, each = 12500),
- dic = corpus_preprocessed_train$dic,
- seq_len = c(600),
+corpus_single_train <- make_bucket_data(word_vec_list = corpus_preprocessed_train$word_vec_list,
+ labels = rep(0:1, each = 12500),
+ dic = corpus_preprocessed_train$dic,
+ seq_len = c(600),
right_pad = T)
-corpus_single_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
- labels = rep(0:1, each = 12500),
- dic = corpus_preprocessed_test$dic,
- seq_len = c(600),
+corpus_single_test <- make_bucket_data(word_vec_list = corpus_preprocessed_test$word_vec_list,
+ labels = rep(0:1, each = 12500),
+ dic = corpus_preprocessed_test$dic,
+ seq_len = c(600),
right_pad = T)
saveRDS(corpus_single_train, file = "data/corpus_single_train.rds")
diff --git a/example/rnn/bucket_R/gru.cell.R b/example/rnn/bucket_R/gru.cell.R
index 5932cdf..91f5917 100644
--- a/example/rnn/bucket_R/gru.cell.R
+++ b/example/rnn/bucket_R/gru.cell.R
@@ -1,54 +1,71 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# GRU cell symbol
-gru.cell <- function(num.hidden, indata, prev.state, param, seqidx, layeridx, dropout = 0,
+gru.cell <- function(num.hidden, indata, prev.state, param, seqidx, layeridx, dropout = 0,
data_masking) {
- i2h <- mx.symbol.FullyConnected(data = indata, weight = param$gates.i2h.weight,
- bias = param$gates.i2h.bias, num.hidden = num.hidden * 2, name = paste0("t",
+ i2h <- mx.symbol.FullyConnected(data = indata, weight = param$gates.i2h.weight,
+ bias = param$gates.i2h.bias, num.hidden = num.hidden * 2, name = paste0("t",
seqidx, ".l", layeridx, ".gates.i2h"))
-
- if (dropout > 0)
+
+ if (dropout > 0)
i2h <- mx.symbol.Dropout(data = i2h, p = dropout)
-
+
if (!is.null(prev.state)) {
- h2h <- mx.symbol.FullyConnected(data = prev.state$h, weight = param$gates.h2h.weight,
- bias = param$gates.h2h.bias, num.hidden = num.hidden * 2, name = paste0("t",
+ h2h <- mx.symbol.FullyConnected(data = prev.state$h, weight = param$gates.h2h.weight,
+ bias = param$gates.h2h.bias, num.hidden = num.hidden * 2, name = paste0("t",
seqidx, ".l", layeridx, ".gates.h2h"))
gates <- i2h + h2h
} else {
gates <- i2h
}
-
- split.gates <- mx.symbol.split(gates, num.outputs = 2, axis = 1, squeeze.axis = F,
+
+ split.gates <- mx.symbol.split(gates, num.outputs = 2, axis = 1, squeeze.axis = F,
name = paste0("t", seqidx, ".l", layeridx, ".split"))
-
+
update.gate <- mx.symbol.Activation(split.gates[[1]], act.type = "sigmoid")
reset.gate <- mx.symbol.Activation(split.gates[[2]], act.type = "sigmoid")
-
- htrans.i2h <- mx.symbol.FullyConnected(data = indata, weight = param$trans.i2h.weight,
- bias = param$trans.i2h.bias, num.hidden = num.hidden, name = paste0("t",
+
+ htrans.i2h <- mx.symbol.FullyConnected(data = indata, weight = param$trans.i2h.weight,
+ bias = param$trans.i2h.bias, num.hidden = num.hidden, name = paste0("t",
seqidx, ".l", layeridx, ".trans.i2h"))
-
+
if (is.null(prev.state)) {
h.after.reset <- reset.gate * 0
} else {
h.after.reset <- prev.state$h * reset.gate
}
-
- htrans.h2h <- mx.symbol.FullyConnected(data = h.after.reset, weight = param$trans.h2h.weight,
- bias = param$trans.h2h.bias, num.hidden = num.hidden, name = paste0("t",
+
+ htrans.h2h <- mx.symbol.FullyConnected(data = h.after.reset, weight = param$trans.h2h.weight,
+ bias = param$trans.h2h.bias, num.hidden = num.hidden, name = paste0("t",
seqidx, ".l", layeridx, ".trans.h2h"))
-
+
h.trans <- htrans.i2h + htrans.h2h
h.trans.active <- mx.symbol.Activation(h.trans, act.type = "tanh")
-
+
if (is.null(prev.state)) {
next.h <- update.gate * h.trans.active
} else {
next.h <- prev.state$h + update.gate * (h.trans.active - prev.state$h)
}
-
+
### Add a mask - using the mask_array approach
data_mask_expand <- mx.symbol.Reshape(data = data_masking, shape = c(1, -2))
next.h <- mx.symbol.broadcast_mul(lhs = next.h, rhs = data_mask_expand)
-
+
return(list(h = next.h))
}
diff --git a/example/rnn/bucket_R/lstm.cell.R b/example/rnn/bucket_R/lstm.cell.R
index 3c7b0e4..5f82ad8 100644
--- a/example/rnn/bucket_R/lstm.cell.R
+++ b/example/rnn/bucket_R/lstm.cell.R
@@ -1,41 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# LSTM cell symbol
-lstm.cell <- function(num.hidden, indata, prev.state, param, seqidx, layeridx, dropout = 0,
+lstm.cell <- function(num.hidden, indata, prev.state, param, seqidx, layeridx, dropout = 0,
data_masking) {
- i2h <- mx.symbol.FullyConnected(data = indata, weight = param$i2h.weight, bias = param$i2h.bias,
+ i2h <- mx.symbol.FullyConnected(data = indata, weight = param$i2h.weight, bias = param$i2h.bias,
num.hidden = num.hidden * 4, name = paste0("t", seqidx, ".l", layeridx, ".i2h"))
-
- if (dropout > 0)
+
+ if (dropout > 0)
i2h <- mx.symbol.Dropout(data = i2h, p = dropout)
-
+
if (!is.null(prev.state)) {
- h2h <- mx.symbol.FullyConnected(data = prev.state$h, weight = param$h2h.weight,
- bias = param$h2h.bias, num.hidden = num.hidden * 4, name = paste0("t",
+ h2h <- mx.symbol.FullyConnected(data = prev.state$h, weight = param$h2h.weight,
+ bias = param$h2h.bias, num.hidden = num.hidden * 4, name = paste0("t",
seqidx, ".l", layeridx, ".h2h"))
gates <- i2h + h2h
} else {
gates <- i2h
}
-
- split.gates <- mx.symbol.split(gates, num.outputs = 4, axis = 1, squeeze.axis = F,
+
+ split.gates <- mx.symbol.split(gates, num.outputs = 4, axis = 1, squeeze.axis = F,
name = paste0("t", seqidx, ".l", layeridx, ".slice"))
-
+
in.gate <- mx.symbol.Activation(split.gates[[1]], act.type = "sigmoid")
in.transform <- mx.symbol.Activation(split.gates[[2]], act.type = "tanh")
forget.gate <- mx.symbol.Activation(split.gates[[3]], act.type = "sigmoid")
out.gate <- mx.symbol.Activation(split.gates[[4]], act.type = "sigmoid")
-
+
if (is.null(prev.state)) {
next.c <- in.gate * in.transform
} else {
next.c <- (forget.gate * prev.state$c) + (in.gate * in.transform)
}
-
+
next.h <- out.gate * mx.symbol.Activation(next.c, act.type = "tanh")
-
+
### Add a mask - using the mask_array approach
data_mask_expand <- mx.symbol.Reshape(data = data_masking, shape = c(1, -2))
next.c <- mx.symbol.broadcast_mul(lhs = next.c, rhs = data_mask_expand)
next.h <- mx.symbol.broadcast_mul(lhs = next.h, rhs = data_mask_expand)
-
+
return(list(c = next.c, h = next.h))
}
diff --git a/example/rnn/bucket_R/mx.io.bucket.iter.R b/example/rnn/bucket_R/mx.io.bucket.iter.R
index 61f8795..febed21 100644
--- a/example/rnn/bucket_R/mx.io.bucket.iter.R
+++ b/example/rnn/bucket_R/mx.io.bucket.iter.R
@@ -1,6 +1,23 @@
-BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "batch.size",
- "data.mask.element", "shuffle", "bucket.plan", "bucketID", "epoch", "batch",
- "batch.per.epoch", "seed"), contains = "Rcpp_MXArrayDataIter", methods = list(initialize = function(buckets,
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "batch.size",
+ "data.mask.element", "shuffle", "bucket.plan", "bucketID", "epoch", "batch",
+ "batch.per.epoch", "seed"), contains = "Rcpp_MXArrayDataIter", methods = list(initialize = function(buckets,
batch.size, data.mask.element = 0, shuffle = FALSE, seed = 123) {
.self$buckets <- buckets
.self$bucket.names <- names(.self$buckets)
@@ -25,16 +42,16 @@ BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "b
.self$batch.per.epoch <- sum(batch_per_bucket)
.self$epoch <- .self$epoch + 1
.self$batch <- 0
-
+
if (.self$shuffle) {
set.seed(.self$seed)
bucket_plan_names <- sample(rep(names(batch_per_bucket), times = batch_per_bucket))
- .self$bucket.plan <- ave(bucket_plan_names == bucket_plan_names, bucket_plan_names,
+ .self$bucket.plan <- ave(bucket_plan_names == bucket_plan_names, bucket_plan_names,
FUN = cumsum)
names(.self$bucket.plan) <- bucket_plan_names
### Return first BucketID at reset for initialization of the model
.self$bucketID <- .self$bucket.plan[1]
-
+
.self$buckets <- lapply(.self$buckets, function(x) {
shuffle_id <- sample(ncol(x$data))
if (length(dim(x$label)) == 0) {
@@ -45,7 +62,7 @@ BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "b
})
} else {
bucket_plan_names <- rep(names(batch_per_bucket), times = batch_per_bucket)
- .self$bucket.plan <- ave(bucket_plan_names == bucket_plan_names, bucket_plan_names,
+ .self$bucket.plan <- ave(bucket_plan_names == bucket_plan_names, bucket_plan_names,
FUN = cumsum)
names(.self$bucket.plan) <- bucket_plan_names
}
@@ -70,12 +87,12 @@ BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "b
} else {
label <- .self$buckets[[names(.self$bucketID)]]$label[, idx, drop = F]
}
- return(list(data = mx.nd.array(data), data.mask.array = mx.nd.array(data_mask_array),
+ return(list(data = mx.nd.array(data), data.mask.array = mx.nd.array(data_mask_array),
label = mx.nd.array(label)))
}, finalize = function() {
}))
-#
+#
#' Create Bucket Iter
#'
#' @param buckets The data array.
@@ -85,8 +102,8 @@ BucketIter <- setRefClass("BucketIter", fields = c("buckets", "bucket.names", "b
#' @param seed The random seed
#'
#' @export
-mx.io.bucket.iter <- function(buckets, batch.size, data.mask.element = 0, shuffle = FALSE,
+mx.io.bucket.iter <- function(buckets, batch.size, data.mask.element = 0, shuffle = FALSE,
seed = 123) {
- return(BucketIter$new(buckets = buckets, batch.size = batch.size, data.mask.element = data.mask.element,
+ return(BucketIter$new(buckets = buckets, batch.size = batch.size, data.mask.element = data.mask.element,
shuffle = shuffle, seed = seed))
}
diff --git a/example/rnn/bucket_R/rnn.R b/example/rnn/bucket_R/rnn.R
index ea02b95..3485cd1 100644
--- a/example/rnn/bucket_R/rnn.R
+++ b/example/rnn/bucket_R/rnn.R
@@ -1,104 +1,121 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
library(mxnet)
source("lstm.cell.R")
source("gru.cell.R")
# unrolled RNN network
-rnn.unroll <- function(num.rnn.layer, seq.len, input.size, num.embed, num.hidden,
- num.label, dropout = 0, ignore_label = 0, init.state = NULL, config, cell.type = "lstm",
+rnn.unroll <- function(num.rnn.layer, seq.len, input.size, num.embed, num.hidden,
+ num.label, dropout = 0, ignore_label = 0, init.state = NULL, config, cell.type = "lstm",
output_last_state = F) {
embed.weight <- mx.symbol.Variable("embed.weight")
cls.weight <- mx.symbol.Variable("cls.weight")
cls.bias <- mx.symbol.Variable("cls.bias")
-
+
param.cells <- lapply(1:num.rnn.layer, function(i) {
if (cell.type == "lstm") {
- cell <- list(i2h.weight = mx.symbol.Variable(paste0("l", i, ".i2h.weight")),
- i2h.bias = mx.symbol.Variable(paste0("l", i, ".i2h.bias")), h2h.weight = mx.symbol.Variable(paste0("l",
- i, ".h2h.weight")), h2h.bias = mx.symbol.Variable(paste0("l", i,
+ cell <- list(i2h.weight = mx.symbol.Variable(paste0("l", i, ".i2h.weight")),
+ i2h.bias = mx.symbol.Variable(paste0("l", i, ".i2h.bias")), h2h.weight = mx.symbol.Variable(paste0("l",
+ i, ".h2h.weight")), h2h.bias = mx.symbol.Variable(paste0("l", i,
".h2h.bias")))
} else if (cell.type == "gru") {
- cell <- list(gates.i2h.weight = mx.symbol.Variable(paste0("l", i, ".gates.i2h.weight")),
- gates.i2h.bias = mx.symbol.Variable(paste0("l", i, ".gates.i2h.bias")),
- gates.h2h.weight = mx.symbol.Variable(paste0("l", i, ".gates.h2h.weight")),
- gates.h2h.bias = mx.symbol.Variable(paste0("l", i, ".gates.h2h.bias")),
- trans.i2h.weight = mx.symbol.Variable(paste0("l", i, ".trans.i2h.weight")),
- trans.i2h.bias = mx.symbol.Variable(paste0("l", i, ".trans.i2h.bias")),
- trans.h2h.weight = mx.symbol.Variable(paste0("l", i, ".trans.h2h.weight")),
+ cell <- list(gates.i2h.weight = mx.symbol.Variable(paste0("l", i, ".gates.i2h.weight")),
+ gates.i2h.bias = mx.symbol.Variable(paste0("l", i, ".gates.i2h.bias")),
+ gates.h2h.weight = mx.symbol.Variable(paste0("l", i, ".gates.h2h.weight")),
+ gates.h2h.bias = mx.symbol.Variable(paste0("l", i, ".gates.h2h.bias")),
+ trans.i2h.weight = mx.symbol.Variable(paste0("l", i, ".trans.i2h.weight")),
+ trans.i2h.bias = mx.symbol.Variable(paste0("l", i, ".trans.i2h.bias")),
+ trans.h2h.weight = mx.symbol.Variable(paste0("l", i, ".trans.h2h.weight")),
trans.h2h.bias = mx.symbol.Variable(paste0("l", i, ".trans.h2h.bias")))
}
return(cell)
})
-
+
# embeding layer
label <- mx.symbol.Variable("label")
data <- mx.symbol.Variable("data")
data_mask_array <- mx.symbol.Variable("data.mask.array")
data_mask_array <- mx.symbol.stop_gradient(data_mask_array, name = "data.mask.array")
-
- embed <- mx.symbol.Embedding(data = data, input_dim = input.size, weight = embed.weight,
+
+ embed <- mx.symbol.Embedding(data = data, input_dim = input.size, weight = embed.weight,
output_dim = num.embed, name = "embed")
-
+
wordvec <- mx.symbol.split(data = embed, axis = 1, num.outputs = seq.len, squeeze_axis = T)
- data_mask_split <- mx.symbol.split(data = data_mask_array, axis = 1, num.outputs = seq.len,
+ data_mask_split <- mx.symbol.split(data = data_mask_array, axis = 1, num.outputs = seq.len,
squeeze_axis = T)
-
+
last.hidden <- list()
last.states <- list()
decode <- list()
softmax <- list()
fc <- list()
-
+
for (seqidx in 1:seq.len) {
hidden <- wordvec[[seqidx]]
-
+
for (i in 1:num.rnn.layer) {
if (seqidx == 1) {
prev.state <- init.state[[i]]
} else {
prev.state <- last.states[[i]]
}
-
+
if (cell.type == "lstm") {
cell.symbol <- lstm.cell
} else if (cell.type == "gru") {
cell.symbol <- gru.cell
}
-
- next.state <- cell.symbol(num.hidden = num.hidden, indata = hidden, prev.state = prev.state,
- param = param.cells[[i]], seqidx = seqidx, layeridx = i, dropout = dropout,
+
+ next.state <- cell.symbol(num.hidden = num.hidden, indata = hidden, prev.state = prev.state,
+ param = param.cells[[i]], seqidx = seqidx, layeridx = i, dropout = dropout,
data_masking = data_mask_split[[seqidx]])
hidden <- next.state$h
# if (dropout > 0) hidden <- mx.symbol.Dropout(data=hidden, p=dropout)
last.states[[i]] <- next.state
}
-
+
# Decoding
if (config == "one-to-one") {
last.hidden <- c(last.hidden, hidden)
}
}
-
+
if (config == "seq-to-one") {
- fc <- mx.symbol.FullyConnected(data = hidden, weight = cls.weight, bias = cls.bias,
+ fc <- mx.symbol.FullyConnected(data = hidden, weight = cls.weight, bias = cls.bias,
num.hidden = num.label)
-
+
loss <- mx.symbol.SoftmaxOutput(data = fc, name = "sm", label = label, ignore_label = ignore_label)
-
+
} else if (config == "one-to-one") {
- last.hidden_expand <- lapply(last.hidden, function(i) mx.symbol.expand_dims(i,
+ last.hidden_expand <- lapply(last.hidden, function(i) mx.symbol.expand_dims(i,
axis = 1))
concat <- mx.symbol.concat(last.hidden_expand, num.args = seq.len, dim = 1)
reshape <- mx.symbol.Reshape(concat, shape = c(num.hidden, -1))
-
- fc <- mx.symbol.FullyConnected(data = reshape, weight = cls.weight, bias = cls.bias,
+
+ fc <- mx.symbol.FullyConnected(data = reshape, weight = cls.weight, bias = cls.bias,
num.hidden = num.label)
-
+
label <- mx.symbol.reshape(data = label, shape = c(-1))
loss <- mx.symbol.SoftmaxOutput(data = fc, name = "sm", label = label, ignore_label = ignore_label)
-
+
}
-
+
if (output_last_state) {
group <- mx.symbol.Group(c(unlist(last.states), loss))
return(group)
@@ -108,32 +125,32 @@ rnn.unroll <- function(num.rnn.layer, seq.len, input.size, num.embed, num.hidden
}
########################################### mx.rnn.buckets
-mx.rnn.buckets <- function(train.data, eval.data = NULL, num.rnn.layer, num.hidden,
- num.embed, num.label, input.size, ctx = NULL, num.round = 1, initializer = mx.init.uniform(0.01),
- dropout = 0, config = "one-to-one", optimizer = "sgd", batch.end.callback = NULL,
- epoch.end.callback = NULL, begin.round = 1, metric = mx.metric.rmse, cell.type = "lstm",
+mx.rnn.buckets <- function(train.data, eval.data = NULL, num.rnn.layer, num.hidden,
+ num.embed, num.label, input.size, ctx = NULL, num.round = 1, initializer = mx.init.uniform(0.01),
+ dropout = 0, config = "one-to-one", optimizer = "sgd", batch.end.callback = NULL,
+ epoch.end.callback = NULL, begin.round = 1, metric = mx.metric.rmse, cell.type = "lstm",
kvstore = "local", verbose = FALSE) {
-
+
if (!train.data$iter.next()) {
train.data$reset()
- if (!train.data$iter.next())
+ if (!train.data$iter.next())
stop("Empty train.data")
}
-
+
if (!is.null(eval.data)) {
if (!eval.data$iter.next()) {
eval.data$reset()
- if (!eval.data$iter.next())
+ if (!eval.data$iter.next())
stop("Empty eval.data")
}
}
-
- if (is.null(ctx))
+
+ if (is.null(ctx))
ctx <- mx.ctx.default()
if (is.mx.context(ctx)) {
ctx <- list(ctx)
}
- if (!is.list(ctx))
+ if (!is.list(ctx))
stop("ctx must be mx.context or list of mx.context")
if (is.character(optimizer)) {
if (is.numeric(input.shape)) {
@@ -145,17 +162,17 @@ mx.rnn.buckets <- function(train.data, eval.data = NULL, num.rnn.layer, num.hidd
}
optimizer <- mx.opt.create(optimizer, rescale.grad = (1/batchsize), ...)
}
-
+
# get unrolled lstm symbol
sym_list <- sapply(train.data$bucket.names, function(x) {
- rnn.unroll(num.rnn.layer = num.rnn.layer, num.hidden = num.hidden, seq.len = as.integer(x),
- input.size = input.size, num.embed = num.embed, num.label = num.label,
+ rnn.unroll(num.rnn.layer = num.rnn.layer, num.hidden = num.hidden, seq.len = as.integer(x),
+ input.size = input.size, num.embed = num.embed, num.label = num.label,
dropout = dropout, cell.type = cell.type, config = config)
}, simplify = F, USE.NAMES = T)
-
+
# setup lstm model
symbol <- sym_list[[names(train.data$bucketID)]]
-
+
arg.names <- symbol$arguments
input.names <- c("data", "data.mask.array")
input.shape <- sapply(input.names, function(n) {
@@ -165,21 +182,21 @@ mx.rnn.buckets <- function(train.data, eval.data = NULL, num.rnn.layer, num.hidd
output.shape <- sapply(output.names, function(n) {
dim(train.data$value()[[n]])
}, simplify = FALSE)
-
- params <- mx.model.init.params(symbol, input.shape, output.shape, initializer,
+
+ params <- mx.model.init.params(symbol, input.shape, output.shape, initializer,
mx.cpu())
-
- kvstore <- mxnet:::mx.model.create.kvstore(kvstore, params$arg.params, length(ctx),
+
+ kvstore <- mxnet:::mx.model.create.kvstore(kvstore, params$arg.params, length(ctx),
verbose = verbose)
-
+
### Execute training - rnn.model.R
- model <- mx.model.train.rnn.buckets(sym_list = sym_list, input.shape = input.shape,
- output.shape = output.shape, arg.params = params$arg.params, aux.params = params$aux.params,
- optimizer = optimizer, train.data = train.data, eval.data = eval.data, verbose = verbose,
- begin.round = begin.round, end.round = num.round, metric = metric, ctx = ctx,
- batch.end.callback = batch.end.callback, epoch.end.callback = epoch.end.callback,
+ model <- mx.model.train.rnn.buckets(sym_list = sym_list, input.shape = input.shape,
+ output.shape = output.shape, arg.params = params$arg.params, aux.params = params$aux.params,
+ optimizer = optimizer, train.data = train.data, eval.data = eval.data, verbose = verbose,
+ begin.round = begin.round, end.round = num.round, metric = metric, ctx = ctx,
+ batch.end.callback = batch.end.callback, epoch.end.callback = epoch.end.callback,
kvstore = kvstore)
-
+
return(model)
}
diff --git a/example/rnn/bucket_R/rnn.infer.R b/example/rnn/bucket_R/rnn.infer.R
index 41488aa..a3b9f53 100644
--- a/example/rnn/bucket_R/rnn.infer.R
+++ b/example/rnn/bucket_R/rnn.infer.R
@@ -1,8 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
library(mxnet)
source("rnn.R")
-mx.rnn.infer.buckets <- function(infer_iter, model, config, ctx = mx.cpu(), output_last_state = FALSE,
+mx.rnn.infer.buckets <- function(infer_iter, model, config, ctx = mx.cpu(), output_last_state = FALSE,
init.state = NULL, cell.type = "lstm") {
### Infer parameters from model
if (cell.type == "lstm") {
@@ -12,65 +29,65 @@ mx.rnn.infer.buckets <- function(infer_iter, model, config, ctx = mx.cpu(), outp
num.rnn.layer <- round((length(model$arg.params) - 3)/8)
num.hidden <- dim(model$arg.params$l1.gates.h2h.weight)[1]
}
-
+
input.size <- dim(model$arg.params$embed.weight)[2]
num.embed <- dim(model$arg.params$embed.weight)[1]
num.label <- dim(model$arg.params$cls.bias)
-
+
### Initialise the iterator
infer_iter$reset()
infer_iter$iter.next()
batch_size <- infer_iter$batch.size
-
+
# get unrolled lstm symbol
sym_list <- sapply(infer_iter$bucket.names, function(x) {
- rnn.unroll(num.rnn.layer = num.rnn.layer, num.hidden = num.hidden, seq.len = as.integer(x),
- input.size = input.size, num.embed = num.embed, num.label = num.label,
- config = config, dropout = 0, init.state = init.state, cell.type = cell.type,
+ rnn.unroll(num.rnn.layer = num.rnn.layer, num.hidden = num.hidden, seq.len = as.integer(x),
+ input.size = input.size, num.embed = num.embed, num.label = num.label,
+ config = config, dropout = 0, init.state = init.state, cell.type = cell.type,
output_last_state = output_last_state)
}, simplify = F, USE.NAMES = T)
-
+
symbol <- sym_list[[names(infer_iter$bucketID)]]
-
+
input.shape <- lapply(infer_iter$value(), dim)
input.shape <- input.shape[names(input.shape) %in% arguments(symbol)]
-
+
infer_shapes <- symbol$infer.shape(input.shape)
arg.params <- model$arg.params
aux.params <- model$aux.params
-
+
input.names <- names(input.shape)
arg.names <- names(arg.params)
-
+
# Grad request
grad_req <- rep("null", length(symbol$arguments))
-
+
# Arg array order
update_names <- c(input.names, arg.names)
arg_update_idx <- match(symbol$arguments, update_names)
-
+
# Initial input shapes - need to be adapted for multi-devices - divide highest
# dimension by device nb
s <- sapply(input.shape, function(shape) {
mx.nd.zeros(shape = shape, ctx = mx.cpu())
})
-
- train.execs <- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, arg.params)[arg_update_idx],
+
+ train.execs <- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, arg.params)[arg_update_idx],
aux.arrays = aux.params, ctx = ctx, grad.req = grad_req)
-
+
packer <- mxnet:::mx.nd.arraypacker()
infer_iter$reset()
while (infer_iter$iter.next()) {
# Get input data slice
dlist <- infer_iter$value()[input.names]
-
+
symbol <- sym_list[[names(infer_iter$bucketID)]]
-
- texec <- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(dlist, train.execs$arg.arrays[arg.names])[arg_update_idx],
+
+ texec <- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(dlist, train.execs$arg.arrays[arg.names])[arg_update_idx],
aux.arrays = train.execs$aux.arrays, ctx = ctx, grad.req = grad_req)
-
+
mx.exec.forward(texec, is.train = FALSE)
-
+
out.preds <- mx.nd.copyto(texec$ref.outputs[[1]], mx.cpu())
packer$push(out.preds)
}
diff --git a/example/rnn/bucket_R/rnn.train.R b/example/rnn/bucket_R/rnn.train.R
index b833b2b..d587e97 100644
--- a/example/rnn/bucket_R/rnn.train.R
+++ b/example/rnn/bucket_R/rnn.train.R
@@ -1,44 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
library(mxnet)
source("rnn.R")
# Internal function to do multiple device training on RNN
-mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, input.shape,
- output.shape, begin.round, end.round, optimizer, train.data, eval.data, metric,
+mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, input.shape,
+ output.shape, begin.round, end.round, optimizer, train.data, eval.data, metric,
epoch.end.callback, batch.end.callback, kvstore, verbose = TRUE) {
symbol <- sym_list[[names(train.data$bucketID)]]
-
+
input.names <- names(input.shape)
output.names <- names(output.shape)
arg.names <- names(arg.params)
-
+
ndevice <- length(ctx)
- if (verbose)
+ if (verbose)
message(paste0("Start training with ", ndevice, " devices"))
input_slice <- mxnet:::mx.model.slice.shape(input.shape, ndevice)
output_slice <- mxnet:::mx.model.slice.shape(output.shape, ndevice)
-
-
+
+
# Grad request
grad_req <- rep("write", length(symbol$arguments))
# grad_null_idx <- match(c(input.names, output.names), symbol$arguments)
grad_null_idx <- match(input.names, symbol$arguments)
grad_req[grad_null_idx] <- "null"
-
+
# Arg array order
update_names <- c(input.names, output.names, arg.names)
arg_update_idx <- match(symbol$arguments, update_names)
-
+
train.execs <- lapply(1:ndevice, function(i) {
s <- sapply(append(input_slice[[i]]$shape, output_slice[[i]]$shape), function(shape) {
mx.nd.zeros(shape = shape, ctx = mx.cpu())
})
- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, arg.params)[arg_update_idx],
+ mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, arg.params)[arg_update_idx],
aux.arrays = aux.params, ctx = mx.cpu(), grad.req = grad_req)
})
-
+
# KVStore related stuffs
- params.index <- as.integer(mxnet:::mx.util.filter.null(lapply(1:length(train.execs[[1]]$ref.grad.arrays),
+ params.index <- as.integer(mxnet:::mx.util.filter.null(lapply(1:length(train.execs[[1]]$ref.grad.arrays),
function(k) {
if (!is.null(train.execs[[1]]$ref.grad.arrays[[k]])) k else NULL
})))
@@ -51,11 +68,11 @@ mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, in
mx.opt.get.updater(optimizer, train.execs[[i]]$ref.arg.arrays)
})
}
-
+
if (!is.null(kvstore)) {
kvstore$init(params.index, train.execs[[1]]$ref.arg.arrays[params.index])
}
-
+
for (iteration in begin.round:end.round) {
nbatch <- 0
if (!is.null(metric)) {
@@ -72,25 +89,25 @@ mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, in
})
return(ret)
})
-
+
train.execs <- lapply(1:ndevice, function(i) {
s <- slices[[i]]
- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, train.execs[[i]]$arg.arrays[arg.names])[arg_update_idx],
+ mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, train.execs[[i]]$arg.arrays[arg.names])[arg_update_idx],
aux.arrays = train.execs[[i]]$aux.arrays, ctx = ctx[[i]], grad.req = grad_req)
})
-
+
for (texec in train.execs) {
mx.exec.forward(texec, is.train = TRUE)
}
-
+
out.preds <- lapply(train.execs, function(texec) {
mx.nd.copyto(texec$ref.outputs[[1]], mx.cpu())
})
-
+
for (texec in train.execs) {
mx.exec.backward(texec)
}
-
+
if (!is.null(kvstore)) {
# push the gradient
kvstore$push(params.index, lapply(train.execs, function(texec) {
@@ -116,29 +133,29 @@ mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, in
mx.exec.update.arg.arrays(train.execs[[i]], arg.blocks[[i]], skip.null = TRUE)
}
}
-
+
# Update the evaluation metrics
if (!is.null(metric)) {
# train.metric <- metric$update(dlist$label, out.preds, train.metric)
for (i in 1:ndevice) {
- train.metric <- metric$update(slices[[i]][[length(slices[[i]])]],
+ train.metric <- metric$update(slices[[i]][[length(slices[[i]])]],
out.preds[[i]], train.metric)
}
}
-
+
nbatch <- nbatch + 1
-
+
if (!is.null(batch.end.callback)) {
batch.end.callback(iteration, nbatch, environment())
}
}
-
+
if (!is.null(metric)) {
result <- metric$get(train.metric)
- if (verbose)
+ if (verbose)
message(paste0("[", iteration, "] Train-", result$name, "=", result$value))
}
-
+
if (!is.null(eval.data)) {
if (!is.null(metric)) {
eval.metric <- metric$init()
@@ -155,35 +172,35 @@ mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, in
})
return(ret)
})
-
-
+
+
train.execs <- lapply(1:ndevice, function(i) {
s <- slices[[i]]
- mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, train.execs[[i]]$arg.arrays[arg.names])[arg_update_idx],
+ mxnet:::mx.symbol.bind(symbol = symbol, arg.arrays = c(s, train.execs[[i]]$arg.arrays[arg.names])[arg_update_idx],
aux.arrays = train.execs[[i]]$aux.arrays, ctx = ctx[[i]], grad.req = grad_req)
})
-
+
for (texec in train.execs) {
mx.exec.forward(texec, is.train = FALSE)
}
-
+
# copy outputs to CPU
out.preds <- lapply(train.execs, function(texec) {
mx.nd.copyto(texec$ref.outputs[[1]], mx.cpu())
})
-
+
if (!is.null(metric)) {
for (i in 1:ndevice) {
- eval.metric <- metric$update(slices[[i]][[length(slices[[i]])]],
+ eval.metric <- metric$update(slices[[i]][[length(slices[[i]])]],
out.preds[[i]], eval.metric)
}
}
}
-
+
if (!is.null(metric)) {
result <- metric$get(eval.metric)
if (verbose) {
- message(paste0("[", iteration, "] Validation-", result$name, "=",
+ message(paste0("[", iteration, "] Validation-", result$name, "=",
result$value))
}
}
@@ -192,12 +209,12 @@ mx.model.train.rnn.buckets <- function(ctx, sym_list, arg.params, aux.params, in
}
# get the model out
model <- mxnet:::mx.model.extract.model(symbol, train.execs)
-
+
epoch_continue <- TRUE
if (!is.null(epoch.end.callback)) {
epoch_continue <- epoch.end.callback(iteration, 0, environment(), verbose = verbose)
}
-
+
if (!epoch_continue) {
break
}
diff --git a/example/speech_recognition/flac_to_wav.sh b/example/speech_recognition/flac_to_wav.sh
old mode 100644
new mode 100755
diff --git a/example/ssd/tools/prepare_coco.sh b/example/ssd/tools/prepare_coco.sh
old mode 100644
new mode 100755
diff --git a/example/ssd/tools/prepare_pascal.sh b/example/ssd/tools/prepare_pascal.sh
old mode 100644
new mode 100755
diff --git a/matlab/+mxnet/model.m b/matlab/+mxnet/model.m
index af61091..4010291 100644
--- a/matlab/+mxnet/model.m
+++ b/matlab/+mxnet/model.m
@@ -1,3 +1,21 @@
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
classdef model < handle
%MODEL MXNet model, supports load and forward
diff --git a/matlab/+mxnet/private/callmxnet.m b/matlab/+mxnet/private/callmxnet.m
index 51f3f6f..4cf8c17 100644
--- a/matlab/+mxnet/private/callmxnet.m
+++ b/matlab/+mxnet/private/callmxnet.m
@@ -1,3 +1,21 @@
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
function callmxnet(func, varargin)
%CALLMXNET call mxnet functions
@@ -7,7 +25,7 @@ if ~libisloaded('libmxnet')
cd(mxnet_root);
mxnet_root = pwd;
cd(cur_pwd);
-
+
assert(exist([mxnet_root, '/lib/libmxnet.so' ], 'file') == 2 || ...
exist([mxnet_root, '/lib/libmxnet.dylib'], 'file') == 2 || ...
exist([mxnet_root, '/lib/libmxnet.dll' ], 'file') == 2, ...
diff --git a/matlab/+mxnet/private/parse_json.m b/matlab/+mxnet/private/parse_json.m
index 6aa0b4e..fbbb616 100644
--- a/matlab/+mxnet/private/parse_json.m
+++ b/matlab/+mxnet/private/parse_json.m
@@ -1,4 +1,22 @@
-function data = parse_json(fname,varargin)
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
+ function data = parse_json(fname,varargin)
%PARSE_JSON parse a JSON (JavaScript Object Notation) file or string
%
% Based on jsonlab (https://github.com/fangq/jsonlab) created by Qianqian Fang. Jsonlab is lisonced under BSD or GPL v3.
diff --git a/matlab/demo.m b/matlab/demo.m
index a914175..659b687 100644
--- a/matlab/demo.m
+++ b/matlab/demo.m
@@ -1,3 +1,21 @@
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
%% Assumes model symbol and parameters already downloaded using .sh script
%% Load the model
diff --git a/matlab/tests/prepare_data.m b/matlab/tests/prepare_data.m
index 6d450cd..429cbc5 100644
--- a/matlab/tests/prepare_data.m
+++ b/matlab/tests/prepare_data.m
@@ -1,3 +1,21 @@
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
%% download cifar10 dataset
system('wget https://www.cs.toronto.edu/~kriz/cifar-10-matlab.tar.gz')
system('tar -xzvf cifar-10-matlab.tar.gz')
diff --git a/matlab/tests/test_prediction.m b/matlab/tests/test_prediction.m
index fe7d7a6..ee73c2d 100644
--- a/matlab/tests/test_prediction.m
+++ b/matlab/tests/test_prediction.m
@@ -1,3 +1,21 @@
+% Licensed to the Apache Software Foundation (ASF) under one
+% or more contributor license agreements. See the NOTICE file
+% distributed with this work for additional information
+% regarding copyright ownership. The ASF licenses this file
+% to you under the Apache License, Version 2.0 (the
+% "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing,
+% software distributed under the License is distributed on an
+% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+% KIND, either express or implied. See the License for the
+% specific language governing permissions and limitations
+% under the License.
+%
+
%% prepare
addpath('..')
diff --git a/nnvm b/nnvm
index 8d79cfd..e4a138a 160000
--- a/nnvm
+++ b/nnvm
@@ -1 +1 @@
-Subproject commit 8d79cfd0b42fbe9f6ad75886d495065d5500b9dd
+Subproject commit e4a138ab947d682c83625840bbcd66f70feb4b14
diff --git a/scala-package/assembly/linux-x86_64-cpu/pom.xml b/scala-package/assembly/linux-x86_64-cpu/pom.xml
index 10f5d39..5f1b4a5 100644
--- a/scala-package/assembly/linux-x86_64-cpu/pom.xml
+++ b/scala-package/assembly/linux-x86_64-cpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml b/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
index 97e34c8..f221a67 100644
--- a/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
+++ b/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
@@ -1,3 +1,23 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<assembly>
<id>full</id>
<formats>
diff --git a/scala-package/assembly/linux-x86_64-gpu/pom.xml b/scala-package/assembly/linux-x86_64-gpu/pom.xml
index 9c9af84..d67a703 100644
--- a/scala-package/assembly/linux-x86_64-gpu/pom.xml
+++ b/scala-package/assembly/linux-x86_64-gpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml b/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
index ba5030c..3ee7167 100644
--- a/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
+++ b/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
@@ -1,3 +1,23 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<assembly>
<id>full</id>
<formats>
diff --git a/scala-package/assembly/osx-x86_64-cpu/main/assembly/assembly.xml b/scala-package/assembly/osx-x86_64-cpu/main/assembly/assembly.xml
index fecafec..9f015ee 100644
--- a/scala-package/assembly/osx-x86_64-cpu/main/assembly/assembly.xml
+++ b/scala-package/assembly/osx-x86_64-cpu/main/assembly/assembly.xml
@@ -1,3 +1,23 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<assembly>
<id>full</id>
<formats>
diff --git a/scala-package/assembly/osx-x86_64-cpu/pom.xml b/scala-package/assembly/osx-x86_64-cpu/pom.xml
index 986245b..a0be325 100644
--- a/scala-package/assembly/osx-x86_64-cpu/pom.xml
+++ b/scala-package/assembly/osx-x86_64-cpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml b/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
index 1abf81d..56ba127 100644
--- a/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
+++ b/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
@@ -1,3 +1,23 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<assembly>
<id>full</id>
<formats>
diff --git a/scala-package/assembly/pom.xml b/scala-package/assembly/pom.xml
index aa9513a..1502686 100644
--- a/scala-package/assembly/pom.xml
+++ b/scala-package/assembly/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/core/pom.xml b/scala-package/core/pom.xml
index 5fede4a..adccfae 100644
--- a/scala-package/core/pom.xml
+++ b/scala-package/core/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/core/src/test/resources/log4j.properties b/scala-package/core/src/test/resources/log4j.properties
index 7d7ca36..d82fd7e 100644
--- a/scala-package/core/src/test/resources/log4j.properties
+++ b/scala-package/core/src/test/resources/log4j.properties
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# for development debugging
log4j.rootLogger = debug, stdout
diff --git a/scala-package/examples/pom.xml b/scala-package/examples/pom.xml
index b6bdc7b..f65caa1 100644
--- a/scala-package/examples/pom.xml
+++ b/scala-package/examples/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/examples/scripts/customop/run_customop.sh b/scala-package/examples/scripts/customop/run_customop.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/customop/run_customopwithrtc.sh b/scala-package/examples/scripts/customop/run_customopwithrtc.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/module/run_sequential_module.sh b/scala-package/examples/scripts/module/run_sequential_module.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/neuralstyle_end2end/run_test_end2end.sh b/scala-package/examples/scripts/neuralstyle_end2end/run_test_end2end.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/neuralstyle_end2end/run_train_end2end.sh b/scala-package/examples/scripts/neuralstyle_end2end/run_train_end2end.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/profiler/run_profiler_matmul.sh b/scala-package/examples/scripts/profiler/run_profiler_matmul.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/profiler/run_profiler_ndarray.sh b/scala-package/examples/scripts/profiler/run_profiler_ndarray.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/rnn/run_lstm_bucketing.sh b/scala-package/examples/scripts/rnn/run_lstm_bucketing.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/rnn/run_test_charrnn.sh b/scala-package/examples/scripts/rnn/run_test_charrnn.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/run_cnntextclassification.sh b/scala-package/examples/scripts/run_cnntextclassification.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/run_gan_mnist.sh b/scala-package/examples/scripts/run_gan_mnist.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/run_multitask.sh b/scala-package/examples/scripts/run_multitask.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/run_neuralstyle.sh b/scala-package/examples/scripts/run_neuralstyle.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/scripts/run_visualization.sh b/scala-package/examples/scripts/run_visualization.sh
old mode 100644
new mode 100755
diff --git a/scala-package/examples/src/main/resources/log4j.properties b/scala-package/examples/src/main/resources/log4j.properties
index cb92f4c..ef523cb 100644
--- a/scala-package/examples/src/main/resources/log4j.properties
+++ b/scala-package/examples/src/main/resources/log4j.properties
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# for development debugging
log4j.rootLogger = info, stdout
diff --git a/scala-package/init-native/linux-x86_64/pom.xml b/scala-package/init-native/linux-x86_64/pom.xml
index e9d9ac3..6a88789 100644
--- a/scala-package/init-native/linux-x86_64/pom.xml
+++ b/scala-package/init-native/linux-x86_64/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/init-native/osx-x86_64/pom.xml b/scala-package/init-native/osx-x86_64/pom.xml
index 6635280..7c00052 100644
--- a/scala-package/init-native/osx-x86_64/pom.xml
+++ b/scala-package/init-native/osx-x86_64/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/init-native/pom.xml b/scala-package/init-native/pom.xml
index 37ecbb8..cb04a38 100644
--- a/scala-package/init-native/pom.xml
+++ b/scala-package/init-native/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/init/pom.xml b/scala-package/init/pom.xml
index 08b6119..3134233 100644
--- a/scala-package/init/pom.xml
+++ b/scala-package/init/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/macros/pom.xml b/scala-package/macros/pom.xml
index e905f2e..e2ee632 100644
--- a/scala-package/macros/pom.xml
+++ b/scala-package/macros/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/native/linux-x86_64-cpu/pom.xml b/scala-package/native/linux-x86_64-cpu/pom.xml
index 4ea7eea..cbe124a 100644
--- a/scala-package/native/linux-x86_64-cpu/pom.xml
+++ b/scala-package/native/linux-x86_64-cpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/native/linux-x86_64-gpu/pom.xml b/scala-package/native/linux-x86_64-gpu/pom.xml
index b8b3ec1..705d84e 100644
--- a/scala-package/native/linux-x86_64-gpu/pom.xml
+++ b/scala-package/native/linux-x86_64-gpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/native/osx-x86_64-cpu/pom.xml b/scala-package/native/osx-x86_64-cpu/pom.xml
index 0b09c1b..b8e741a 100644
--- a/scala-package/native/osx-x86_64-cpu/pom.xml
+++ b/scala-package/native/osx-x86_64-cpu/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/native/pom.xml b/scala-package/native/pom.xml
index 5013fe9..dfa2386 100644
--- a/scala-package/native/pom.xml
+++ b/scala-package/native/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/scala-package/spark/pom.xml b/scala-package/spark/pom.xml
index 98d7249..68e6f4e 100644
--- a/scala-package/spark/pom.xml
+++ b/scala-package/spark/pom.xml
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/setup-utils/install-mxnet-amz-linux.sh b/setup-utils/install-mxnet-amz-linux.sh
old mode 100644
new mode 100755
diff --git a/setup-utils/install-mxnet-fedora-python.sh b/setup-utils/install-mxnet-fedora-python.sh
old mode 100644
new mode 100755
diff --git a/setup-utils/install-mxnet-ubuntu-python.sh b/setup-utils/install-mxnet-ubuntu-python.sh
old mode 100644
new mode 100755
diff --git a/setup-utils/install-mxnet-ubuntu-r.sh b/setup-utils/install-mxnet-ubuntu-r.sh
old mode 100644
new mode 100755
diff --git a/src/nnvm/legacy_json_util.cc b/src/nnvm/legacy_json_util.cc
index bdd983c..2ddd4a1 100644
--- a/src/nnvm/legacy_json_util.cc
+++ b/src/nnvm/legacy_json_util.cc
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*!
* Copyright (c) 2016 by Contributors
* \file legacy_json_util.cc
diff --git a/src/nnvm/legacy_op_util.cc b/src/nnvm/legacy_op_util.cc
index e5d1d1c..6048d15 100644
--- a/src/nnvm/legacy_op_util.cc
+++ b/src/nnvm/legacy_op_util.cc
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*!
* Copyright (c) 2015 by Contributors
* \file legacy_op_util.cc
diff --git a/src/operator/contrib/ctc_include/contrib/moderngpu/include/mgpuenums.h b/src/operator/contrib/ctc_include/contrib/moderngpu/include/mgpuenums.h
index be2b831..601614b 100644
--- a/src/operator/contrib/ctc_include/contrib/moderngpu/include/mgpuenums.h
+++ b/src/operator/contrib/ctc_include/contrib/moderngpu/include/mgpuenums.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/******************************************************************************
* Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
*
diff --git a/src/operator/contrib/ctc_include/contrib/moderngpu/include/util/static.h b/src/operator/contrib/ctc_include/contrib/moderngpu/include/util/static.h
index c720907..0160155 100644
--- a/src/operator/contrib/ctc_include/contrib/moderngpu/include/util/static.h
+++ b/src/operator/contrib/ctc_include/contrib/moderngpu/include/util/static.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/******************************************************************************
* Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
*
diff --git a/src/operator/contrib/ctc_include/detail/cpu_ctc.h b/src/operator/contrib/ctc_include/detail/cpu_ctc.h
index ba8bbc5..1509b6d 100644
--- a/src/operator/contrib/ctc_include/detail/cpu_ctc.h
+++ b/src/operator/contrib/ctc_include/detail/cpu_ctc.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#pragma once
#include <tuple>
diff --git a/src/operator/contrib/ctc_include/detail/ctc_helper.h b/src/operator/contrib/ctc_include/detail/ctc_helper.h
index 35b7a96..6dae61a 100644
--- a/src/operator/contrib/ctc_include/detail/ctc_helper.h
+++ b/src/operator/contrib/ctc_include/detail/ctc_helper.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#pragma once
#include <limits>
diff --git a/src/operator/contrib/ctc_include/detail/gpu_ctc.h b/src/operator/contrib/ctc_include/detail/gpu_ctc.h
index c9cab80..b3c5d1f 100644
--- a/src/operator/contrib/ctc_include/detail/gpu_ctc.h
+++ b/src/operator/contrib/ctc_include/detail/gpu_ctc.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#pragma once
diff --git a/src/operator/contrib/ctc_include/detail/gpu_ctc_kernels.h b/src/operator/contrib/ctc_include/detail/gpu_ctc_kernels.h
index 7f53232..99d8e4d 100644
--- a/src/operator/contrib/ctc_include/detail/gpu_ctc_kernels.h
+++ b/src/operator/contrib/ctc_include/detail/gpu_ctc_kernels.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#pragma once
#include "../contrib/moderngpu/include/device/ctascan.cuh"
diff --git a/src/operator/contrib/ctc_include/detail/hostdevice.h b/src/operator/contrib/ctc_include/detail/hostdevice.h
index 7bec1e0..4f68d03 100644
--- a/src/operator/contrib/ctc_include/detail/hostdevice.h
+++ b/src/operator/contrib/ctc_include/detail/hostdevice.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#pragma once
#ifdef __CUDACC__
diff --git a/tests/ci_build/install/install_julia.sh b/tests/ci_build/install/install_julia.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_library.sh b/tests/ci_build/install/install_library.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_maven.sh b/tests/ci_build/install/install_maven.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_openblas.sh b/tests/ci_build/install/install_openblas.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_opencv.sh b/tests/ci_build/install/install_opencv.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_python2.sh b/tests/ci_build/install/install_python2.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_python3.sh b/tests/ci_build/install/install_python3.sh
old mode 100644
new mode 100755
diff --git a/tests/ci_build/install/install_testdeps.sh b/tests/ci_build/install/install_testdeps.sh
old mode 100644
new mode 100755
diff --git a/tests/jenkins/set_user_permissions.sh b/tests/jenkins/set_user_permissions.sh
old mode 100644
new mode 100755
diff --git a/tests/nightly/compilation_warnings/compilation_warnings.sh b/tests/nightly/compilation_warnings/compilation_warnings.sh
old mode 100644
new mode 100755
diff --git a/tests/nightly/download.sh b/tests/nightly/download.sh
old mode 100644
new mode 100755
diff --git a/tests/nightly/sh2ju.sh b/tests/nightly/sh2ju.sh
old mode 100644
new mode 100755
diff --git a/tests/travis/r_vignettes.R b/tests/travis/r_vignettes.R
index 1aa9a4f..1b03b8b 100644
--- a/tests/travis/r_vignettes.R
+++ b/tests/travis/r_vignettes.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
fnames <- list.files("R-package/vignettes/", pattern="*.Rmd")
sapply(fnames, function(x){
knitr::purl(paste0("R-package/vignettes/", x))
diff --git a/tools/license_header.py b/tools/license_header.py
index 6267d52..7903279 100644
--- a/tools/license_header.py
+++ b/tools/license_header.py
@@ -63,6 +63,7 @@ _WHITE_LIST = ['R-package/',
'nnvm',
'ps-lite',
'src/operator/mkl/',
+ 'cmake/Modules/FindJeMalloc.cmake',
'src/operator/special_functions-inl.h',
'src/operator/nn/pool.h',
'src/operator/contrib/psroi_pooling-inl.h',
@@ -70,7 +71,8 @@ _WHITE_LIST = ['R-package/',
'example/speech-demo/io_func/convert2kaldi.py',
'example/speech-demo/decode_mxnet.sh',
'example/image-classification/predict-cpp/image-classification-predict.cc',
- 'src/operator/contrib/ctc_include/']
+ 'src/operator/contrib/ctc_include/',
+ 'cmake/Modules/FindJeMalloc.cmake']
# language extensions and the according commment mark
_LANGS = {'.cc':'*', '.h':'*', '.cu':'*', '.cuh':'*', '.py':'#',
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].