[GitHub] hyxie6 opened a new pull request #7699: Fix bug in rpn.py

2017-08-31 Thread git
hyxie6 opened a new pull request #7699: Fix bug in rpn.py
URL: https://github.com/apache/incubator-mxnet/pull/7699
 
 
   logger.level = loggin.INFO by default, which can harm the performance when 
trained using default setting.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7698: Refactor Autograd backward

2017-08-31 Thread git
piiswrong commented on a change in pull request #7698: Refactor Autograd 
backward
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r136499398
 
 

 ##
 File path: include/mxnet/ndarray.h
 ##
 @@ -875,8 +860,10 @@ class NDArray {
   size_t byte_offset_ = 0;
   /*! \brief type of data */
   int dtype_ = -1;
+  /*! \brief storage type of data */
+  NDArrayStorageType storage_type_ = kUndefinedStorage;
 
 Review comment:
   Still used. This is for accessing storage_type for none NDArray
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on a change in pull request #7698: Refactor Autograd backward

2017-08-31 Thread git
eric-haibin-lin commented on a change in pull request #7698: Refactor Autograd 
backward
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r136497709
 
 

 ##
 File path: include/mxnet/ndarray.h
 ##
 @@ -875,8 +860,10 @@ class NDArray {
   size_t byte_offset_ = 0;
   /*! \brief type of data */
   int dtype_ = -1;
+  /*! \brief storage type of data */
+  NDArrayStorageType storage_type_ = kUndefinedStorage;
 
 Review comment:
   Is the `storage_type` in Chunk removed/no longer used?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] universewill commented on issue #6142: Does anyone have pretrained inception-resnet-v2 model?

2017-08-31 Thread git
universewill commented on issue #6142: Does anyone have pretrained 
inception-resnet-v2 model?
URL: 
https://github.com/apache/incubator-mxnet/issues/6142#issuecomment-326480403
 
 
   I am also looking for inception-v4 and inception-resnet-v2, does anyone have 
them?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong opened a new pull request #7698: Refactor Autograd backward

2017-08-31 Thread git
piiswrong opened a new pull request #7698: Refactor Autograd backward
URL: https://github.com/apache/incubator-mxnet/pull/7698
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] universewill opened a new issue #7697: can not find pretrained model of inception-v4 and inception-resnet-v2 in model zoo.

2017-08-31 Thread git
universewill opened a new issue #7697: can not find pretrained model of 
inception-v4 and inception-resnet-v2 in model zoo.
URL: https://github.com/apache/incubator-mxnet/issues/7697
 
 
   i need pretrained model of inception-v4 and inception-resnet-v2 , but i can 
not find them in model zoo. I think it is proper to add them in the model zoo.
   Does anyone have one?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zzningxp commented on issue #2027: [lib/libmxnet.so] Error installing mxnet for EI Capitan 10.11.4

2017-08-31 Thread git
zzningxp commented on issue #2027: [lib/libmxnet.so] Error installing mxnet for 
EI Capitan 10.11.4
URL: 
https://github.com/apache/incubator-mxnet/issues/2027#issuecomment-326478495
 
 
   I ran into the same issue with Macbook Pro late 2015, 10.12.3 Sierra, gcc-7.
   
   I believe that the issue is cause by two versions of OpenCV (2.4.13 and 
3.2), because I ran into OpenCV issue several times on my MBP.
   So, I tried 2.4.13.2 and 3.20 and HEAD-3649ee3, and only 2.4.13 works, with 
g++/clang++, not g++-7.
   ```
   mxnet daodao$ g++ --version
   Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
   Apple LLVM version 8.1.0 (clang-802.0.42)
   Target: x86_64-apple-darwin16.4.0
   Thread model: posix
   InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
   ```
   
   The most important thing here is to setup OpenCV version explicitly:
   ```
   # setup opencv
   ifeq ($(USE_OPENCV), 1)
CFLAGS  += -DMXNET_USE_OPENCV=1 
-I/usr/local/Cellar/opencv/2.4.13.2/include -I/usr/local/include
LDFLAGS += $(filter-out -lopencv_ts, 
-L/usr/local/Cellar/opencv/2.4.13.2/lib -lopencv_shape -lopencv_stitching 
-lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d 
-lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs 
-lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann 
-lopencv_core)
#CFLAGS += -DMXNET_USE_OPENCV=1 $(shell pkg-config --cflags opencv)
#LDFLAGS += $(filter-out -lopencv_ts, $(shell pkg-config --libs opencv))
BIN += bin/im2rec
   else
CFLAGS+= -DMXNET_USE_OPENCV=0
   endif
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong closed pull request #7694: [R] fix Jenkins R testing.

2017-08-31 Thread git
piiswrong closed pull request #7694: [R] fix Jenkins R testing.
URL: https://github.com/apache/incubator-mxnet/pull/7694
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: [R] fix Jenkins R testing. (#7694)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 93cd017  [R] fix Jenkins R testing. (#7694)
93cd017 is described below

commit 93cd0178a012c4867550aae9ce887f08d41aee6b
Author: Qiang Kou (KK) 
AuthorDate: Thu Aug 31 23:15:42 2017 -0400

[R] fix Jenkins R testing. (#7694)
---
 Jenkinsfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index bf514bc..6adbea1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -379,7 +379,7 @@ try {
   sh "${docker_run} cpu rm -rf .Renviron"
   sh "${docker_run} cpu mkdir -p /workspace/ut-r-cpu/site-library"
   sh "${docker_run} cpu make rpkg USE_BLAS=openblas 
R_LIBS=/workspace/ut-r-cpu/site-library"
-  sh "${docker_run} cpu R CMD INSTALL 
--library=/workspace/ut-r-cpu/site-library mxnet_current_r.tar.gz"
+  sh "${docker_run} cpu R CMD INSTALL 
--library=/workspace/ut-r-cpu/site-library R-package"
   sh "${docker_run} cpu make rpkgtest 
R_LIBS=/workspace/ut-r-cpu/site-library"
 }
   }
@@ -394,7 +394,7 @@ try {
   sh "${docker_run} gpu rm -rf .Renviron"
   sh "${docker_run} gpu mkdir -p /workspace/ut-r-gpu/site-library"
   sh "${docker_run} gpu make rpkg USE_BLAS=openblas 
R_LIBS=/workspace/ut-r-gpu/site-library"
-  sh "${docker_run} gpu R CMD INSTALL 
--library=/workspace/ut-r-gpu/site-library mxnet_current_r.tar.gz"
+  sh "${docker_run} gpu R CMD INSTALL 
--library=/workspace/ut-r-gpu/site-library R-package"
   sh "${docker_run} gpu make rpkgtest 
R_LIBS=/workspace/ut-r-gpu/site-library R_GPU_ENABLE=1"
 }
   }

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[incubator-mxnet] branch master updated: [WIP] support autograd with sparse grad (#7695)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 7835864  [WIP] support autograd with sparse grad (#7695)
7835864 is described below

commit 783586486facb913e725354628a4d6c636952a6a
Author: Haibin Lin 
AuthorDate: Thu Aug 31 20:14:47 2017 -0700

[WIP] support autograd with sparse grad (#7695)

* fix autograd with sparse gradient

* fix doc
---
 python/mxnet/ndarray/ndarray.py   | 16 ---
 src/operator/tensor/init_op.cc|  3 +++
 src/operator/tensor/init_op.cu|  3 ++-
 tests/python/unittest/test_autograd.py| 39 +++
 tests/python/unittest/test_sparse_operator.py | 10 +++
 5 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/python/mxnet/ndarray/ndarray.py b/python/mxnet/ndarray/ndarray.py
index d5d4bb2..670ecd9 100644
--- a/python/mxnet/ndarray/ndarray.py
+++ b/python/mxnet/ndarray/ndarray.py
@@ -1393,7 +1393,7 @@ fixed-size items.
 return self
 return self.copyto(context)
 
-def attach_grad(self, grad_req='write'):
+def attach_grad(self, grad_req='write', stype=None):
 """Attach a gradient buffer to this NDArray, so that `backward`
 can compute gradient with respect to it.
 
@@ -1404,8 +1404,14 @@ fixed-size items.
 - 'write': gradient will be overwritten on every backward.
 - 'add': gradient will be added to existing value on every 
backward.
 - 'null': do not compute gradient for this NDArray.
+stype : str, optional
+The storage type of the gradient array. Defaults to the same stype 
of this NDArray.
 """
-grad = op.zeros_like(self)  # pylint: disable=undefined-variable
+from . import zeros as _zeros
+if stype is not None:
+grad = _zeros(self.shape, stype=stype)
+else:
+grad = op.zeros_like(self)  # pylint: disable=undefined-variable
 grad_req = _GRAD_REQ_MAP[grad_req]
 check_call(_LIB.MXAutogradMarkVariables(
 1, ctypes.pointer(self.handle),
@@ -1415,17 +1421,19 @@ fixed-size items.
 @property
 def grad(self):
 """Returns gradient buffer attached to this NDArray."""
+from . import _ndarray_cls
 hdl = NDArrayHandle()
 check_call(_LIB.MXNDArrayGetGrad(self.handle, ctypes.byref(hdl)))
 if hdl.value is None:
 return None
-return NDArray(hdl)
+return _ndarray_cls(hdl)
 
 def detach(self):
 """Returns a new NDArray, detached from the current graph."""
+from . import _ndarray_cls
 hdl = NDArrayHandle()
 check_call(_LIB.MXNDArrayDetach(self.handle, ctypes.byref(hdl)))
-return NDArray(hdl)
+return _ndarray_cls(hdl)
 
 def backward(self, out_grad=None, retain_graph=False, train_mode=True):
 """Compute the gradients of this NDArray w.r.t variables.
diff --git a/src/operator/tensor/init_op.cc b/src/operator/tensor/init_op.cc
index 9f333d2..37296c5 100644
--- a/src/operator/tensor/init_op.cc
+++ b/src/operator/tensor/init_op.cc
@@ -63,6 +63,7 @@ NNVM_REGISTER_OP(_arange)
 .add_arguments(RangeParam::__FIELDS__());
 
 NNVM_REGISTER_OP(zeros_like)
+.add_alias("_sparse_zeros_like")
 .describe(R"code(Return an array of zeros with the same shape and type
 as the input array.
 
@@ -79,9 +80,11 @@ Examples::
 .set_num_outputs(1)
 .set_attr("FInferShape", ElemwiseShape<1, 1>)
 .set_attr("FInferType", ElemwiseType<1, 1>)
+.set_attr("FInferStorageType", ElemwiseStorageType<1, 1>)
 .set_attr("FIgnoreInputs",
 [](const NodeAttrs& attrs) { return std::vector(1, 0); })
 .set_attr("FCompute", FillCompute)
+.set_attr("FComputeEx", FillComputeZerosEx)
 .set_attr("FGradient", MakeZeroGradNodes)
 .add_argument("data", "NDArray-or-Symbol", "The input");
 
diff --git a/src/operator/tensor/init_op.cu b/src/operator/tensor/init_op.cu
index cbee203..24a367c 100644
--- a/src/operator/tensor/init_op.cu
+++ b/src/operator/tensor/init_op.cu
@@ -37,7 +37,8 @@ NNVM_REGISTER_OP(_arange)
 .set_attr("FCompute", RangeCompute);
 
 NNVM_REGISTER_OP(zeros_like)
-.set_attr("FCompute", FillCompute);
+.set_attr("FCompute", FillCompute)
+.set_attr("FComputeEx", FillComputeZerosEx);
 
 NNVM_REGISTER_OP(ones_like)
 .set_attr("FCompute", FillCompute);
diff --git a/tests/python/unittest/test_autograd.py 
b/tests/python/unittest/test_autograd.py
index 9e1eb66..f1bb863 100644
--- a/tests/python/unittest/test_autograd.py
+++ b/tests/python/unittest/test_autograd.py
@@ -375,6 +375,45 @@ def test_get_symbol():
 y = x*x + 2*z - 1
 assert len(get_symbol(y).list_arguments()) == 2
 
+def test_grad_with_stype():
+def 

[incubator-mxnet] branch master updated: Fix unit test for test_loss.py (#7693)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 31f27d6  Fix unit test for test_loss.py (#7693)
31f27d6 is described below

commit 31f27d68eed1c37a60e13b80ab5ba17c1602306e
Author: Aston Zhang 
AuthorDate: Thu Aug 31 20:12:59 2017 -0700

Fix unit test for test_loss.py (#7693)

* Fix a typo

* update

* change variable name from defered_init to deferred_init

* change function name: test_defered_init -> test_deferred_init

* Add learning_rate and lr_scheduler properties and add setter for learning 
rate

* Update the learning_rate property and add property docstring in init

* Update the docstring

* Make learning rate getter/setter the concern of the optimizer

* Add space between words

* Update setters

* disable pylint complaint for too-many-lines

* Add more docstring explanations

* Patch for issues of hard to pass L1loss unittest

* Patch for test_loss unittest: already tested with 100 random test cases 
without seeds

* Important patch: replace all optimizers from sgd to adam.

* chmod back to 644

* revert changes to test_loss: will send a separate pr

* Patch for test_loss to reduce failure rate that is purely due to 
randomness: replace all sgd to adam

* patch for unittest: replace all sgds with adams

* revert optimizer

* add linebreak
---
 tests/python/unittest/test_loss.py | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/tests/python/unittest/test_loss.py 
b/tests/python/unittest/test_loss.py
index 85875c6..9158004 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -70,15 +70,14 @@ def test_ce_loss():
 label = mx.nd.array(np.random.randint(0, nclass, size=(N,)), dtype='int32')
 data_iter = mx.io.NDArrayIter(data, label, batch_size=10, 
label_name='label')
 output = get_net(nclass)
-fc2 = output.get_internals()['fc2_output']
 l = mx.symbol.Variable('label')
 Loss = gluon.loss.SoftmaxCrossEntropyLoss()
 loss = Loss(output, l)
 loss = mx.sym.make_loss(loss)
 mod = mx.mod.Module(loss, data_names=('data',), label_names=('label',))
-mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 1.},
-eval_metric=mx.metric.Loss())
-assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.01
+mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
+eval_metric=mx.metric.Loss(), optimizer='adam')
+assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
 def test_bce_loss():
@@ -88,14 +87,14 @@ def test_bce_loss():
 label = mx.nd.array(np.random.randint(2, size=(N,)), dtype='float32')
 data_iter = mx.io.NDArrayIter(data, label, batch_size=10, 
label_name='label')
 output = get_net(1)
-fc2 = output.get_internals()['fc2_output']
 l = mx.symbol.Variable('label')
 Loss = gluon.loss.SigmoidBinaryCrossEntropyLoss()
 loss = Loss(output, l)
 loss = mx.sym.make_loss(loss)
 mod = mx.mod.Module(loss, data_names=('data',), label_names=('label',))
-mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 1.},
-eval_metric=mx.metric.Loss())
+mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
+eval_metric=mx.metric.Loss(), optimizer='adam',
+initializer=mx.init.Xavier(magnitude=2))
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.01
 
 def test_bce_equal_ce2():
@@ -120,8 +119,8 @@ def test_kl_loss():
 loss = Loss(output, l)
 loss = mx.sym.make_loss(loss)
 mod = mx.mod.Module(loss, data_names=('data',), label_names=('label',))
-mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 1.},
-eval_metric=mx.metric.Loss())
+mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
+eval_metric=mx.metric.Loss(), optimizer='adam')
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
@@ -138,8 +137,9 @@ def test_l2_loss():
 loss = Loss(output, l)
 loss = mx.sym.make_loss(loss)
 mod = mx.mod.Module(loss, data_names=('data',), label_names=('label',))
-mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.1, 
'wd': 0.00045},
-initializer=mx.init.Xavier(magnitude=2), 
eval_metric=mx.metric.Loss())
+mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
+initializer=mx.init.Xavier(magnitude=2), 
eval_metric=mx.metric.Loss(),
+optimizer='adam')
 assert mod.score(data_iter, 

[GitHub] CodingCat opened a new pull request #7696: [scala-package] fix the bug in parent section of pom files

2017-08-31 Thread git
CodingCat opened a new pull request #7696: [scala-package] fix the bug in 
parent section of pom files
URL: https://github.com/apache/incubator-mxnet/pull/7696
 
 
   Sorry for introducing this bug several weeks ago
   
   Actually, Maven cannot parse any variable in parent section
   
   I have changed those project.version back and validate in my local maven, 
working fine now
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on issue #7690: Change gluon link

2017-08-31 Thread git
piiswrong commented on issue #7690: Change gluon link
URL: https://github.com/apache/incubator-mxnet/pull/7690#issuecomment-326461229
 
 
   Can we change this to .. Gluon: style node?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7692: Fixed Embedding Layer on Gluon

2017-08-31 Thread git
szha commented on issue #7692: Fixed Embedding Layer on Gluon
URL: 
https://github.com/apache/incubator-mxnet/issues/7692#issuecomment-326458830
 
 
   Or you can do the dot and addition yourself with the fixed weight matrix.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7692: Fixed Embedding Layer on Gluon

2017-08-31 Thread git
szha commented on issue #7692: Fixed Embedding Layer on Gluon
URL: 
https://github.com/apache/incubator-mxnet/issues/7692#issuecomment-326458646
 
 
   ```python
   layer = Dense(10)
   layer.weight.lr_mult=0
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang commented on a change in pull request #7678: Clean amalgamation ws and skip failing test

2017-08-31 Thread git
astonzhang commented on a change in pull request #7678: Clean amalgamation ws 
and skip failing test
URL: https://github.com/apache/incubator-mxnet/pull/7678#discussion_r136480471
 
 

 ##
 File path: tests/python/unittest/test_loss.py
 ##
 @@ -63,6 +63,9 @@ def get_net(num_hidden):
 
 
 def test_ce_loss():
+# Skipping this test to have nightly build passing.
+# There seems to be an issue and tracked at - issue 7677
+return
 
 Review comment:
   The unittest fix is now available in a separate pr #7693 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing opened a new pull request #7694: [R] fix Jenkins R testing.

2017-08-31 Thread git
thirdwing opened a new pull request #7694: [R] fix Jenkins R testing.
URL: https://github.com/apache/incubator-mxnet/pull/7694
 
 
   Please don't merge too quick. I need some time to confirm I didn't break 
anything.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang commented on issue #7677: Issue with Loss function

2017-08-31 Thread git
astonzhang commented on issue #7677: Issue with Loss function
URL: 
https://github.com/apache/incubator-mxnet/issues/7677#issuecomment-326457219
 
 
   Thank you @sandeep-krishnamurthy 
   The separate PR is now available in #7693 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang commented on issue #7659: Gluon trainer updates: add learning_rate and lr_scheduler properties and add setter for learning rate

2017-08-31 Thread git
astonzhang commented on issue #7659: Gluon trainer updates: add learning_rate 
and lr_scheduler properties and add setter for learning rate
URL: https://github.com/apache/incubator-mxnet/pull/7659#issuecomment-326456981
 
 
   The unit test patch is in a separate pr as suggested by @piiswrong 
   #7693 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang commented on a change in pull request #7659: Gluon trainer updates: add learning_rate and lr_scheduler properties and add setter for learning rate, and patch for issues of hard to

2017-08-31 Thread git
astonzhang commented on a change in pull request #7659: Gluon trainer updates: 
add learning_rate and lr_scheduler properties and add setter for learning rate, 
and patch for issues of hard to pass L1loss unittest
URL: https://github.com/apache/incubator-mxnet/pull/7659#discussion_r136479468
 
 

 ##
 File path: tests/python/unittest/test_loss.py
 ##
 @@ -70,15 +70,14 @@ def test_ce_loss():
 label = mx.nd.array(np.random.randint(0, nclass, size=(N,)), dtype='int32')
 
 Review comment:
   resolved
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rravu3 opened a new issue #7692: Fixed Embedding Layer on Gluon

2017-08-31 Thread git
rravu3 opened a new issue #7692: Fixed Embedding Layer on Gluon
URL: https://github.com/apache/incubator-mxnet/issues/7692
 
 
   Is there a way to declare a Layer(Block) to be constant and not be updated 
during training?
   The only way I see it as of now is to create my own layer and not add 
embedding matrix to the ParameterDict.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang closed pull request #7691: Unit test patch

2017-08-31 Thread git
astonzhang closed pull request #7691: Unit test patch
URL: https://github.com/apache/incubator-mxnet/pull/7691
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang opened a new pull request #7691: Unit test patch

2017-08-31 Thread git
astonzhang opened a new pull request #7691: Unit test patch
URL: https://github.com/apache/incubator-mxnet/pull/7691
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] sandeep-krishnamurthy opened a new issue #7675: [Jenkins CI] Broken R Unit test during build

2017-08-31 Thread git
sandeep-krishnamurthy opened a new issue #7675: [Jenkins CI] Broken R Unit test 
during build
URL: https://github.com/apache/incubator-mxnet/issues/7675
 
 
   @thirdwing 
   
   R GPU unit tests are failing more frequently on the master branch. Can you 
please take a look at this?
   Example failed CI build - 
https://builds.apache.org/blue/organizations/jenkins/incubator-mxnet/detail/master/272/pipeline/
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] sandeep-krishnamurthy commented on issue #7675: [Jenkins CI] Broken R Unit test during build

2017-08-31 Thread git
sandeep-krishnamurthy commented on issue #7675: [Jenkins CI] Broken R Unit test 
during build
URL: 
https://github.com/apache/incubator-mxnet/issues/7675#issuecomment-326454909
 
 
   This is causing a new issue. All master builds are failing. Can we relook at 
it? @thirdwing
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] astonzhang opened a new pull request #7689: Unit test patch

2017-08-31 Thread git
astonzhang opened a new pull request #7689: Unit test patch
URL: https://github.com/apache/incubator-mxnet/pull/7689
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on issue #7656: [WIP] CSRNDArray Tutorial

2017-08-31 Thread git
eric-haibin-lin commented on issue #7656: [WIP] CSRNDArray Tutorial
URL: https://github.com/apache/incubator-mxnet/pull/7656#issuecomment-326444818
 
 
   Updated the tutorial with runnable example for data iterators. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on issue #7688: [WIP] update doc for sparse related APIs

2017-08-31 Thread git
eric-haibin-lin commented on issue #7688: [WIP] update doc for sparse related 
APIs
URL: https://github.com/apache/incubator-mxnet/pull/7688#issuecomment-326435330
 
 
   @anirudh2290 @rahul003 @reminisce 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin opened a new pull request #7688: [WIP] update doc for sparse related APIs

2017-08-31 Thread git
eric-haibin-lin opened a new pull request #7688: [WIP] update doc for sparse 
related APIs
URL: https://github.com/apache/incubator-mxnet/pull/7688
 
 
   - update NDArrayIter API doc with CSRNDArray inputs
   - update document for kv.init, kv.push 
   - add test for #7676
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jiecaoyu commented on issue #5460: very low training accuracies with alexnet or vgg but good with resnet

2017-08-31 Thread git
jiecaoyu commented on issue #5460: very low training accuracies with alexnet or 
vgg but good with resnet
URL: 
https://github.com/apache/incubator-mxnet/issues/5460#issuecomment-326431931
 
 
   Using pytorch but has the same problem. Changing the initial lr to 0.01 can 
probably fix the problem. 0.1 is too high for AlexNet without BatchNorm.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on issue #7676: Add more gpu tests and fix nested try catch in Imperative Invoke

2017-08-31 Thread git
eric-haibin-lin commented on issue #7676: Add more gpu tests and fix nested try 
catch in Imperative Invoke 
URL: https://github.com/apache/incubator-mxnet/pull/7676#issuecomment-326428539
 
 
   will do
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mli commented on issue #7676: Add more gpu tests and fix nested try catch in Imperative Invoke

2017-08-31 Thread git
mli commented on issue #7676: Add more gpu tests and fix nested try catch in 
Imperative Invoke 
URL: https://github.com/apache/incubator-mxnet/pull/7676#issuecomment-326428196
 
 
   can you write a test case to avoid this case?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Fix shape inference bug (#7682)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 6d71577  Fix shape inference bug (#7682)
6d71577 is described below

commit 6d7157768e216bcb4b505f98555fc72286d160fb
Author: reminisce 
AuthorDate: Thu Aug 31 14:11:14 2017 -0700

Fix shape inference bug (#7682)
---
 src/executor/infer_graph_attr_pass.cc |  5 -
 tests/python/unittest/test_symbol.py  | 25 +
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/executor/infer_graph_attr_pass.cc 
b/src/executor/infer_graph_attr_pass.cc
index 144c371..76b95f3 100644
--- a/src/executor/infer_graph_attr_pass.cc
+++ b/src/executor/infer_graph_attr_pass.cc
@@ -160,7 +160,10 @@ nnvm::Graph InferAttr(nnvm::Graph &,
   uint32_t eid = idx.entry_id(nid, igrad[i].index);
   if (fis_none(rshape[eid])) {
 rshape[eid] = rshape[idx.entry_id(fnode.inputs[i])];
-  } else {
+  } else if (!fis_none(rshape[idx.entry_id(fnode.inputs[i])])) {
+// Need to skip empty forward shape, because it may not be
+// available now and it is possible to infer the forward
+// shape in one of the next a few passes
 CHECK_EQ(rshape[eid], rshape[idx.entry_id(fnode.inputs[i])])
 << "Backward shape inconsistent with the forward shape";
   }
diff --git a/tests/python/unittest/test_symbol.py 
b/tests/python/unittest/test_symbol.py
index 4d162ec..4a2cdb3 100644
--- a/tests/python/unittest/test_symbol.py
+++ b/tests/python/unittest/test_symbol.py
@@ -286,6 +286,31 @@ def test_zero_prop2():
 assert False
 
 
+def test_simple_bind_special_case():
+"""This is a special case that results in shape inference
+failure after moving simple_bind logic from frontend to backend.
+Added here for testing against the network similar to the following one.
+
+Network diagram:
+weight --> abs_op --> sum_op --
+   |--> add_op
+data   --> fc_op  --> sum_op --
+
+Given data's shape, if the shape inference starts from weight node,
+then the node entries of negative_op and sum_op are unknown in the
+forward pass. Therefore, there are several unknown shapes after the
+first forward pass is done. Now the backward inference pass starts with
+the assumption that there are no unknown-shape node entries in the forward
+pass, and consequently, leads to CHECK_EQ failure.
+"""
+data_shape = (5, 13)
+data = mx.sym.Variable('data')
+fc = mx.sym.FullyConnected(data=data, num_hidden=1, no_bias=True, 
name='fc')
+modified_weight = mx.sym.abs(fc.get_internals()['fc_weight'])
+net = mx.sym.sum(modified_weight) + mx.sym.sum(fc)
+net.simple_bind(ctx=mx.cpu(), data=data_shape)
+
+
 if __name__ == '__main__':
 import nose
 nose.runmodule()

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong closed pull request #7682: Fix shape inference bug

2017-08-31 Thread git
piiswrong closed pull request #7682: Fix shape inference bug
URL: https://github.com/apache/incubator-mxnet/pull/7682
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: [R] update Makefile. close #7675 (#7686)

2017-08-31 Thread skm
This is an automated email from the ASF dual-hosted git repository.

skm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 0d294dd  [R] update Makefile. close #7675 (#7686)
0d294dd is described below

commit 0d294dd876e54023ed5e9c5676092a36a1566ab3
Author: Qiang Kou (KK) 
AuthorDate: Thu Aug 31 15:47:13 2017 -0400

[R] update Makefile. close #7675 (#7686)
---
 Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index b42621e..bfd0382 100644
--- a/Makefile
+++ b/Makefile
@@ -412,10 +412,8 @@ rpkg:
devtools::install_version('roxygen2',version='5.0.1',\
repo='https://cloud.r-project.org/',quiet=TRUE)}"
Rscript -e "require(roxygen2); roxygen2::roxygenise('R-package')"
-   R CMD build --no-build-vignettes R-package
-   rm -rf mxnet_current_r.tar.gz
+   R CMD INSTALL R-package
rm -rf R-package/src/image_recordio.h
-   mv mxnet_*.tar.gz mxnet_current_r.tar.gz
 
 rpkgtest:
Rscript -e 
"require(testthat);res<-test_dir('R-package/tests/testthat');if(!testthat:::all_passed(res)){stop('Test
 failures', call. = FALSE)}"

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] sandeep-krishnamurthy closed issue #7675: [Jenkins CI] Broken R Unit test during build

2017-08-31 Thread git
sandeep-krishnamurthy closed issue #7675: [Jenkins CI] Broken R Unit test 
during build
URL: https://github.com/apache/incubator-mxnet/issues/7675
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7390: adding ranking metrics (precision/recall) at position K.

2017-08-31 Thread git
szha commented on issue #7390: adding ranking metrics (precision/recall) at 
position K. 
URL: https://github.com/apache/incubator-mxnet/pull/7390#issuecomment-326396710
 
 
   Not necessarily. You can compute and bind the update function based on the 
type of metric in the constructor, since metric is a class.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nikrao commented on issue #7390: adding ranking metrics (precision/recall) at position K.

2017-08-31 Thread git
nikrao commented on issue #7390: adding ranking metrics (precision/recall) at 
position K. 
URL: https://github.com/apache/incubator-mxnet/pull/7390#issuecomment-326394318
 
 
   @eric-haibin-lin @szha I think it's better to have them separate. In many 
occasions you might use them together, but there are also other examples where 
you only need one or the other. In the latter case, we will just be spending 
more time computing (or checking if we should compute) a metric we don't need. 
You can always create a composite metric by concatenating 2 metrics anyway 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zqkhan opened a new issue #7687: dec (in examples) fails for 2 cluster

2017-08-31 Thread git
zqkhan opened a new issue #7687: dec (in examples) fails for 2 cluster
URL: https://github.com/apache/incubator-mxnet/issues/7687
 
 
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to 
help you.
   
   ## Environment info
   Operating System: GNU/linux
   
   Compiler:
   
   Package used : python
   
   MXNet version: 0.7.0
   
   Or if installed from source:
   
   MXNet commit hash (`git rev-parse HEAD`):
   
   If you are using python package, please provide
   
   Python version and distribution: 2.7.5
   
   ## Error Message:
   
   Please paste the full error message, including stack trace.
   
   121.5 [220 463]
   102.5 [444 239]
   0.948755490483
   463 0.683
   Traceback (most recent call last):
 File "dec.py", line 190, in 
   mnist_exp(mx.cpu(0))
 File "dec.py", line 175, in mnist_exp
   a,b,y[i] = dec_model.cluster(X,Y,i)
 File "dec.py", line 155, in cluster
   train_iter, 0, 10, {}, False)
 File "/home/khan.zu/mxnet-master/example/dec/../autoencoder/solver.py", 
line 117, in solve
   [output_buff[output_names[0]]])
 File 
"/shared/apps/python/Python-2.7.5/INSTALL/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/metric.py",
 line 350, in update
   reval = self._feval(label, pred)
 File "dec.py", line 125, in ce
   return np.sum(label*np.log(label/(pred+0.01)))/label.shape[0]
   ValueError: operands could not be broadcast together with shapes (256,2) 
(256,)
   
   ## Minimum reproducible example
   using the same code as in the example/dec with my own dataset which has 2 
clusters, works fine when i set clusters more than 2
   if you are using your own code, please provide a short script that 
reproduces the error.
   
   ## Steps to reproduce
   or if you are running standard examples, please provide the commands you 
have run that lead to the error.
   
   1.
   2.
   3.
   
   ## What have you tried to solve it?
   
   1.
   2.
   3.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on issue #7390: adding ranking metrics (precision/recall) at position K.

2017-08-31 Thread git
eric-haibin-lin commented on issue #7390: adding ranking metrics 
(precision/recall) at position K. 
URL: https://github.com/apache/incubator-mxnet/pull/7390#issuecomment-326382105
 
 
   @nikrao  It is fair to assume that usually precision and recall are used 
together? Do you think it's better to have one metric that compute both 
precision and recall as @szha requested? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7659: Gluon trainer updates: add learning_rate and lr_scheduler properties and add setter for learning rate, and patch for issues of hard to pass L1loss unittest

2017-08-31 Thread git
szha commented on issue #7659: Gluon trainer updates: add learning_rate and 
lr_scheduler properties and add setter for learning rate, and patch for issues 
of hard to pass L1loss unittest
URL: https://github.com/apache/incubator-mxnet/pull/7659#issuecomment-326376129
 
 
   All tests passed except R GPU, @thirdwing is fixing this in #7686.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing commented on issue #7686: [R] update Makefile. close #7675

2017-08-31 Thread git
thirdwing commented on issue #7686: [R] update Makefile. close #7675
URL: https://github.com/apache/incubator-mxnet/pull/7686#issuecomment-326373258
 
 
   As @sandeep-krishnamurthy pointed out, we might some problems like 
https://builds.apache.org/blue/organizations/jenkins/incubator-mxnet/detail/master/272/pipeline/#step-611-log-1184
   
   This is quite weird and broke our CI testing. This PR is a workaround.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] madjam commented on issue #7686: [R] update Makefile. close #7675

2017-08-31 Thread git
madjam commented on issue #7686: [R] update Makefile. close #7675
URL: https://github.com/apache/incubator-mxnet/pull/7686#issuecomment-326367550
 
 
   @thirdwing what was the issue here?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7683: How can I debug mxnet?

2017-08-31 Thread git
szha commented on issue #7683: How can I debug mxnet?
URL: 
https://github.com/apache/incubator-mxnet/issues/7683#issuecomment-326367470
 
 
   @mxmxlwlw what would you describe as elegant? IDE integration?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing opened a new pull request #7686: [R] update Makefile. close #7675

2017-08-31 Thread git
thirdwing opened a new pull request #7686: [R] update Makefile. close #7675
URL: https://github.com/apache/incubator-mxnet/pull/7686
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alexandraj777 commented on issue #7673: Update docs/README link and folder name

2017-08-31 Thread git
alexandraj777 commented on issue #7673: Update docs/README link and folder name
URL: https://github.com/apache/incubator-mxnet/pull/7673#issuecomment-326357955
 
 
   Thanks for reviewing @piiswrong!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jeremiedb commented on issue #7476: R-package RNN refactor

2017-08-31 Thread git
jeremiedb commented on issue #7476: R-package RNN refactor
URL: https://github.com/apache/incubator-mxnet/pull/7476#issuecomment-326354740
 
 
   @thirdwing I'm out for 10 days, I'll try to put my hands a computer by then 
but it may take a few days. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] sandeep-krishnamurthy commented on issue #7675: [Jenkins CI] Broken R Unit test during build

2017-08-31 Thread git
sandeep-krishnamurthy commented on issue #7675: [Jenkins CI] Broken R Unit test 
during build
URL: 
https://github.com/apache/incubator-mxnet/issues/7675#issuecomment-326352938
 
 
   @thirdwing Can we work on the fix to this soon? This issue is causing more 
frequent build failures.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] sandeep-krishnamurthy commented on issue #7677: Issue with Loss function

2017-08-31 Thread git
sandeep-krishnamurthy commented on issue #7677: Issue with Loss function
URL: 
https://github.com/apache/incubator-mxnet/issues/7677#issuecomment-326352196
 
 
   Thanks @astonzhang Can we get this fix to the test go ahead in separate PR 
ASAP so that we recover from failing builds?
   Thanks for working on this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] goodtogood commented on issue #6297: warpctc run sample error

2017-08-31 Thread git
goodtogood commented on issue #6297: warpctc run sample error
URL: 
https://github.com/apache/incubator-mxnet/issues/6297#issuecomment-326352048
 
 
   same problem.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alexandraj777 commented on a change in pull request #7673: Update docs/README link and folder name

2017-08-31 Thread git
alexandraj777 commented on a change in pull request #7673: Update docs/README 
link and folder name
URL: https://github.com/apache/incubator-mxnet/pull/7673#discussion_r136378068
 
 

 ##
 File path: docs/build_version_doc/build_all_version.sh
 ##
 @@ -24,7 +24,7 @@
 tag_list="0.11.0.rc3 master"
 
 mxnet_url="https://github.com/apache/incubator-mxnet.git;
-mxnet_folder="apache_mxnet"
+mxnet_folder="mxnet"
 
 Review comment:
   Oh duh >.< 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ptrendx opened a new pull request #7685: Fix for hang in depthwise convolution for CUDA 9

2017-08-31 Thread git
ptrendx opened a new pull request #7685: Fix for hang in depthwise convolution 
for CUDA 9
URL: https://github.com/apache/incubator-mxnet/pull/7685
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mxmxlwlw commented on issue #7683: How can I debug mxnet?

2017-08-31 Thread git
mxmxlwlw commented on issue #7683: How can I debug mxnet?
URL: 
https://github.com/apache/incubator-mxnet/issues/7683#issuecomment-326232607
 
 
   @szha  Yes, that's how I do this now. So there's no elegant way to do this? 
Because I want to debug every function in the mxnet.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mxmxlwlw commented on issue #7683: How can I debug mxnet?

2017-08-31 Thread git
mxmxlwlw commented on issue #7683: How can I debug mxnet?
URL: 
https://github.com/apache/incubator-mxnet/issues/7683#issuecomment-326232607
 
 
   Yes, that's how I do this now. So there's no elegant way to do this? Because 
I want to debug every function in the mxnet.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liuzhi136 opened a new issue #7684: Python3.5 MXNet doesn't execute for loop??

2017-08-31 Thread git
liuzhi136 opened a new issue #7684: Python3.5 MXNet doesn't execute for loop??
URL: https://github.com/apache/incubator-mxnet/issues/7684
 
 
   I try to follow The Custom Iterator section's code in the tutorial page at  
https://mxnet.incubator.apache.org/tutorials/basic/data.html.  But I found 
these two line are never executed!
   data = [mx.nd.array(g(d[1])) for d,g in zip(self._provide_data, 
self.data_gen)]
   label = [mx.nd.array(g(d[1])) for d,g in zip(self._provide_label, 
self.label_gen)]
   My python's version is python3.5 and mxnet is 0.95.
   Does any could help to fix this problem?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4746#issuecomment-326216878
 
 
   One of the reason for this issue is that you run the python command in the 
exact directory you install MXNet.
   
   Say that you clone the MXNet project into `/home/user1/incubator-mxnet`, you 
build the mxnet library then go to the `python` directory to run install 
command `python setup.py install --user`.
   
   After that , please exit the `python` directory before you run `python` to 
test mxnet.
   
   As there is a directory named `mxnet` in the `incubator-mxnet/python` 
directory, if you run `python` in directory `incubator-mxnet/python` and then 
`import mxnet as mx`, python will try to import the directory instead of the 
mxnet lib.
   
   In conclusion, do not start python shell in the `incubator-mxnet/python` 
directory, or else you will get the `cannot import name libinfo`  error message.
   
   Please create a new issue to report it if you didn't run python shell in 
`incubator-mxnet/python`  while you get the same error message `cannot import 
name libinfo`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4794#issuecomment-326217436
 
 
   duplicate with #4746 .
   
   My comment in #4746 
   
   One of the reason for this issue is that you run the python command in the 
exact directory you install MXNet.
   
   Say that you clone the MXNet project into `/home/user1/incubator-mxnet`, you 
build the mxnet library then go to the `python` directory to run install 
command `python setup.py install --user`.
   
   After that , please exit the `python` directory before you run python to 
test mxnet.
   
   As there is a directory named `mxnet` in the `incubator-mxnet/python` 
directory, if you run python in directory `incubator-mxnet/python` and then 
`import mxnet as mx`, python will try to import the directory instead of the 
mxnet lib.
   
   In conclusion, do not start python shell in the `incubator-mxnet/python` 
directory, or else you will get the `cannot import name libinfo` error message.
   
   Please create a new issue to report it if you didn't run python shell in 
`incubator-mxnet/python` while you still get the same error message `cannot 
import name libinfo`
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7683: How can I debug mxnet?

2017-08-31 Thread git
szha commented on issue #7683: How can I debug mxnet?
URL: 
https://github.com/apache/incubator-mxnet/issues/7683#issuecomment-326219694
 
 
   DEBUG flag in make config, and gdb
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4794#issuecomment-326217436
 
 
   duplicate with #4746 .
   
   My comment in #4746 
   
   One of the reason for this issue is that you run the python command in the 
exact directory you install MXNet.
   
   Say that you clone the MXNet project into `/home/user1/incubator-mxnet`, you 
build the mxnet library then go to the `python` directory to run install 
command `python setup.py install --user`.
   
   After that , please exit the `python` directory before you run python to 
test mxnet.
   
   As there is a directory named `mxnet` in the `incubator-mxnet/python` 
directory, if you run python in directory `incubator-mxnet/python` and then 
`import mxnet as mx`, python will try to import the directory instead of the 
mxnet lib.
   
   In conclusion, do not start python shell in the `incubator-mxnet/python` 
directory, or else you will get the `cannot import name libinfo` error message.
   
   Please create a new issue to report it if you didn't run python shell in 
`incubator-mxnet/python` while you still get the same error message `cannot 
import name libinfo`
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4794: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4794#issuecomment-326217436
 
 
   duplicate with #4746 .
   
   My comment in #4746 
   
   One of the reason for this issue is that you run the python command in the 
exact directory you install MXNet.
   
   Say that you clone the MXNet project into /home/user1/incubator-mxnet, you 
build the mxnet library then go to the python directory to run install command 
python setup.py install --user.
   
   After that , please exit the python directory before you run python to test 
mxnet.
   
   As there is a directory named mxnet in the incubator-mxnet/python directory, 
if you run python in directory incubator-mxnet/python and then import mxnet as 
mx, python will try to import the directory instead of the mxnet lib.
   
   In conclusion, do not start python shell in the incubator-mxnet/python 
directory, or else you will get the cannot import name libinfo error message.
   
   Please create a new issue to report it if you didn't run python shell in 
incubator-mxnet/python while you get the same error message cannot import name 
libinfo
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4746#issuecomment-326216878
 
 
   One of the reason for this issue is that you run the python command in the 
exact directory you install MXNet.
   
   Say that you clone the MXNet project into `/home/user1/incubator-mxnet`, you 
build the mxnet library then go to the `python` directory to run install 
command `python setup.py install --user`.
   
   After that , please exit the `python` directory before you run `python` to 
test mxnet.
   
   As there is a directory named `mxnet` in the `incubator-mxnet/python` 
directory, if you run `python` in directory `incubator-mxnet/python` and then 
`import mxnet as mx`, python will try to import the directory instead of the 
mxnet lib.
   
   In conclusion, do not start python shell in the `incubator-mxnet/python` 
directory, or else you will get the `cannot import name libinfo`  error message.
   
   Please create a new issue to report it if you didn't run python shell in 
`incubator-mxnet/python`  while you get the same error message `cannot import 
name libinfo`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name libinfo

2017-08-31 Thread git
DamonDeng commented on issue #4746: ImportError for mxnet: cannot import name 
libinfo
URL: 
https://github.com/apache/incubator-mxnet/issues/4746#issuecomment-326216878
 
 
   One of the reason for this that you run the python command in the exact 
directory you install MXNet.
   
   Say that you clone the MXNet project into `/home/user1/incubator-mxnet`, you 
build the mxnet library then go to the `python` directory to run install 
command `python setup.py install --user`.
   
   After that , please exit the `python` directory before you run `python` to 
test mxnet.
   
   As there is a directory named `mxnet` in the `incubator-mxnet/python` 
directory, if you run `python` in directory `incubator-mxnet/python` and then 
`import mxnet as mx`, python will try to import the directory instead of the 
mxnet lib.
   
   In conclusion, do not start python shell in the `incubator-mxnet/python` 
directory, or else you will get the `cannot import name libinfo`  error message.
   
   Please create a new issue to report it if you didn't run python shell in 
`incubator-mxnet/python`  while you get the same error message `cannot import 
name libinfo`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mxmxlwlw opened a new issue #7683: How can I debug mxnet?

2017-08-31 Thread git
mxmxlwlw opened a new issue #7683: How can I debug mxnet?
URL: https://github.com/apache/incubator-mxnet/issues/7683
 
 
   Hi, I want to debug mxnet, and I use mxnet in python. How can I smoothly 
debug mxnet and its submodule nnvm?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] luoyetx commented on issue #7057: Python CustomOp with parameter failed when call infer_shape_entry in operator.py

2017-08-31 Thread git
luoyetx commented on issue #7057: Python CustomOp with parameter failed when 
call infer_shape_entry in operator.py
URL: 
https://github.com/apache/incubator-mxnet/issues/7057#issuecomment-326211510
 
 
   f
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] luoyetx commented on issue #7057: Python CustomOp with parameter failed when call infer_shape_entry in operator.py

2017-08-31 Thread git
luoyetx commented on issue #7057: Python CustomOp with parameter failed when 
call infer_shape_entry in operator.py
URL: 
https://github.com/apache/incubator-mxnet/issues/7057#issuecomment-326211510
 
 
   f
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] reminisce opened a new pull request #7682: Fix shape inference bug

2017-08-31 Thread git
reminisce opened a new pull request #7682: Fix shape inference bug
URL: https://github.com/apache/incubator-mxnet/pull/7682
 
 
   This PR fixes a shape inference bug in function `InferAttr`.
   Consider the following network:
   ```
   weight --> abs_op --> sum_op 
\ 
add_op
/
   data   --> fc_op --> sum_op
   ```
   Given a data shape, if the shape forward inference starts from weight, there 
would be several node entries with unknown shapes for  abs_op and sum_op. The 
weight shape is only known after fc_op's shape inference is done. When the 
backward shape inference starts, it assumes that all forward node entries' 
shapes are known. However, this is not true in this case and therefore, leads 
to `CHECK_EQ` failure.
   
   The problem is fixed by skipping `CHECK_EQ` for empty shapes in the backward 
shape inference.
   
   @piiswrong @eric-haibin-lin 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #7653: ipython, The kernel appears to have died. It will restart automatically.

2017-08-31 Thread git
DamonDeng commented on issue #7653: ipython, The kernel appears to have died. 
It will restart automatically.
URL: 
https://github.com/apache/incubator-mxnet/issues/7653#issuecomment-326203364
 
 
   Dear, 
   Would you please share more information of the code you run?
   
   I have tested the following code in Jupyter notebook environment, and it 
works well:
   
import mxnet as mx

x = mx.nd.ones((2,3))
y = mx.nd.ones((2,3))*2

z = mx.nd.dot(x, y.T)

z.asnumpy()
   
   the output is:
   
   `array([[ 6.,  6.],
  [ 6.,  6.]], dtype=float32)`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DamonDeng commented on issue #7653: ipython, The kernel appears to have died. It will restart automatically.

2017-08-31 Thread git
DamonDeng commented on issue #7653: ipython, The kernel appears to have died. 
It will restart automatically.
URL: 
https://github.com/apache/incubator-mxnet/issues/7653#issuecomment-326203364
 
 
   Dear, 
   Would you please share more information of the code you run?
   
   I have tested the following code in Jupyter notebook environment, and it 
works well:
   
   `import mxnet as mx
   x = mx.nd.ones((2,3))
   y = mx.nd.ones((2,3))*2
   
   z = mx.nd.dot(x, y.T)
   
   z.asnumpy()`
   
   the output is:
   
   `array([[ 6.,  6.],
  [ 6.,  6.]], dtype=float32)`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on issue #7617: Fix memory leak in profiler

2017-08-31 Thread git
piiswrong commented on issue #7617: Fix memory leak in profiler
URL: https://github.com/apache/incubator-mxnet/pull/7617#issuecomment-326200854
 
 
   This isn't compiling
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7673: Update docs/README link and folder name

2017-08-31 Thread git
piiswrong commented on a change in pull request #7673: Update docs/README link 
and folder name
URL: https://github.com/apache/incubator-mxnet/pull/7673#discussion_r136252802
 
 

 ##
 File path: docs/build_version_doc/build_all_version.sh
 ##
 @@ -24,7 +24,7 @@
 tag_list="0.11.0.rc3 master"
 
 mxnet_url="https://github.com/apache/incubator-mxnet.git;
-mxnet_folder="apache_mxnet"
+mxnet_folder="mxnet"
 
 Review comment:
   This is not part of doc
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Update docs/README link and folder name (#7673)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 4562ddd  Update docs/README link and folder name (#7673)
4562ddd is described below

commit 4562ddd54917e611a47122bd502059e0889a76b9
Author: Alexandra L Johnson 
AuthorDate: Wed Aug 30 23:14:51 2017 -0700

Update docs/README link and folder name (#7673)

* Update docs/README link and folder name

* Update git clone statements

* Update build_all_version.sh
---
 docs/README.md   | 4 ++--
 docs/build_version_doc/AddVersion.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/README.md b/docs/README.md
index 8fd0592..35c6d3e 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,12 +2,12 @@
 
 A built version of document is available at http://mxnet.io
 
-To build the documents locally, we need to first install [docker](docker.com).
+To build the documents locally, we need to first install 
[docker](https://docker.com).
 Then use the following commands to clone and
 build the documents.
 
 ```bash
-git clone --recursive https://github.com/apache/incubator-mxnet.git
+git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
 cd mxnet && make docs
 ```
 
diff --git a/docs/build_version_doc/AddVersion.py 
b/docs/build_version_doc/AddVersion.py
index e5569a0..f7abdbf 100755
--- a/docs/build_version_doc/AddVersion.py
+++ b/docs/build_version_doc/AddVersion.py
@@ -90,7 +90,7 @@ if __name__ == '__main__':
 pip_pattern = ['', '-cu80', '-cu75', '-cu80mkl', '-cu75mkl', 
'-mkl']
 if args.current_version == 'master':
 outstr = outstr.replace('git clone --recursive 
https://github.com/dmlc/mxnet',
-'git clone --recursive 
https://github.com/apache/incubator-mxnet.git')
+'git clone --recursive 
https://github.com/apache/incubator-mxnet.git mxnet')
 for trail in pip_pattern:
 outstr = outstr.replace('pip install mxnet%s<' % (trail),
 'pip install mxnet%s --pre<' % 
(trail))
@@ -98,7 +98,7 @@ if __name__ == '__main__':
 'pip install mxnet%s --pre\n<' % 
(trail))
 else:
 outstr = outstr.replace('git clone --recursive 
https://github.com/dmlc/mxnet',
-'git clone --recursive 
https://github.com/apache/incubator-mxnet.git '
+'git clone --recursive 
https://github.com/apache/incubator-mxnet.git mxnet '
 '--branch %s' % (args.current_version))
 for trail in pip_pattern:
 outstr = outstr.replace('pip install mxnet%s<' % (trail),

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong closed pull request #7673: Update docs/README link and folder name

2017-08-31 Thread git
piiswrong closed pull request #7673: Update docs/README link and folder name
URL: https://github.com/apache/incubator-mxnet/pull/7673
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong closed pull request #7670: update log epsilons to 1e-12

2017-08-31 Thread git
piiswrong closed pull request #7670: update log epsilons to 1e-12
URL: https://github.com/apache/incubator-mxnet/pull/7670
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Add more gpu tests and fix nested try catch in Imperative Invoke (#7676)

2017-08-31 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new f9a97ca  Add more gpu tests and fix nested try catch in Imperative 
Invoke  (#7676)
f9a97ca is described below

commit f9a97ca8a523ec3ff074f8113f7fed11f3f0769d
Author: Haibin Lin 
AuthorDate: Wed Aug 30 23:12:06 2017 -0700

Add more gpu tests and fix nested try catch in Imperative Invoke  (#7676)

* add more test in test_gpu

* remove a density for cast_storage since its slow

* fix nested try catch in imperative invoke

* import * from test_ndarary

* add inline

* fix wrong args in pick
---
 src/c_api/c_api_ndarray.cc|  34 ++-
 tests/python/gpu/test_operator_gpu.py |   4 +-
 tests/python/unittest/test_ndarray.py |   4 +-
 tests/python/unittest/test_sparse_operator.py | 337 +-
 4 files changed, 198 insertions(+), 181 deletions(-)

diff --git a/src/c_api/c_api_ndarray.cc b/src/c_api/c_api_ndarray.cc
index 64fa74d..5d3fd70 100644
--- a/src/c_api/c_api_ndarray.cc
+++ b/src/c_api/c_api_ndarray.cc
@@ -550,19 +550,18 @@ void ImperativeInvokeImpl(const Context& default_ctx,
   }
 }
 
-int MXImperativeInvoke(AtomicSymbolCreator creator,
-   int num_inputs,
-   NDArrayHandle *inputs,
-   int *num_outputs,
-   NDArrayHandle **outputs,
-   int num_params,
-   const char **param_keys,
-   const char **param_vals) {
+inline void MXImperativeInvokeImpl(AtomicSymbolCreator creator,
+   int num_inputs,
+   NDArrayHandle *inputs,
+   int *num_outputs,
+   NDArrayHandle **outputs,
+   int num_params,
+   const char **param_keys,
+   const char **param_vals) {
   const nnvm::Op* op = static_cast(creator);
   MXAPIThreadLocalEntry *ret = MXAPIThreadLocalStore::Get();
   NDArray** outarray = *reinterpret_cast(outputs);
 
-  API_BEGIN();
   nnvm::NodeAttrs attrs;
   SetOpAttrs(op, , num_inputs, num_params, param_keys, param_vals);
 
@@ -588,6 +587,19 @@ int MXImperativeInvoke(AtomicSymbolCreator creator,
   *outarray[i] = std::move(ndoutputs[i]);
 }
   }
+}
+
+int MXImperativeInvoke(AtomicSymbolCreator creator,
+   int num_inputs,
+   NDArrayHandle *inputs,
+   int *num_outputs,
+   NDArrayHandle **outputs,
+   int num_params,
+   const char **param_keys,
+   const char **param_vals) {
+  API_BEGIN();
+  MXImperativeInvokeImpl(creator, num_inputs, inputs, num_outputs,
+ outputs, num_params, param_keys, param_vals);
   API_END();
 }
 
@@ -601,8 +613,8 @@ int MXImperativeInvokeEx(AtomicSymbolCreator creator,
  const char **param_vals,
  const int **out_stypes) {  // outputs storage types
   API_BEGIN();
-  MXImperativeInvoke(creator, num_inputs, inputs, num_outputs, outputs,
- num_params, param_keys, param_vals);
+  MXImperativeInvokeImpl(creator, num_inputs, inputs, num_outputs, outputs,
+ num_params, param_keys, param_vals);
   MXAPIThreadLocalEntry *ret = MXAPIThreadLocalStore::Get();
   NDArray** output_nds = reinterpret_cast(*outputs);
   ret->out_types.resize(*num_outputs);
diff --git a/tests/python/gpu/test_operator_gpu.py 
b/tests/python/gpu/test_operator_gpu.py
index f9845f9..73a1f95 100644
--- a/tests/python/gpu/test_operator_gpu.py
+++ b/tests/python/gpu/test_operator_gpu.py
@@ -33,9 +33,9 @@ from test_gluon import *
 from test_loss import *
 #from test_rnn import *
 from test_gluon_rnn import *
-from test_sparse_operator import test_cast_storage_ex, test_sparse_dot
-from test_sparse_operator import test_sparse_nd_zeros, test_sparse_retain
 from test_sparse_ndarray import test_create_csr, test_create_row_sparse
+from test_sparse_operator import *
+from test_ndarray import *
 
 set_default_context(mx.gpu(0))
 del test_support_vector_machine_l1_svm
diff --git a/tests/python/unittest/test_ndarray.py 
b/tests/python/unittest/test_ndarray.py
index 7d11dbe..7cb6891 100644
--- a/tests/python/unittest/test_ndarray.py
+++ b/tests/python/unittest/test_ndarray.py
@@ -705,7 +705,7 @@ def test_ndarray_fluent():
 'clip', 'abs' 'sign'])
 def check_fluent_regular(func, kwargs, shape=(5, 17, 1)):
 with mx.name.NameManager():
-data = 

[GitHub] piiswrong closed pull request #7676: Add more gpu tests and fix nested try catch in Imperative Invoke

2017-08-31 Thread git
piiswrong closed pull request #7676: Add more gpu tests and fix nested try 
catch in Imperative Invoke 
URL: https://github.com/apache/incubator-mxnet/pull/7676
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services