[GitHub] szha commented on issue #7913: what are the dependencies between each modules

2017-09-15 Thread git
szha commented on issue #7913: what are the dependencies between each modules
URL: 
https://github.com/apache/incubator-mxnet/issues/7913#issuecomment-329947781
 
 
   The best starting point that gives larger picture can be found in this doc: 
https://mxnet.incubator.apache.org/versions/master/architecture/overview.html
 

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 #7913: what are the dependencies between each modules

2017-09-15 Thread git
mxmxlwlw opened a new issue #7913: what are the dependencies between each 
modules
URL: https://github.com/apache/incubator-mxnet/issues/7913
 
 
   Hi,
   I like your design of mxnet very much, but I still can't get the idea of 
dependencies between each modules. I'd be really appreciated if you give me 
some hints.
   Like what is the dependency between executor, engine, kvstore, ndarray, 
operator, storage, nnvm.
   I've read your code for three weeks, but still can't grape the whole 
ideas of your architecture. I just know how they may do some specific tasks.
 

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 #7910: add advanced indexing

2017-09-15 Thread git
szha commented on issue #7910: add advanced indexing
URL: https://github.com/apache/incubator-mxnet/pull/7910#issuecomment-329947462
 
 
   If we introduce a non-grouped symbol class which can only be obtained from a 
method of non-grouped symbols, we can introduce advanced indexing on that 
non-grouped symbol class. For example,
   ```python
   simple_symbol = regular_symbol.simple()
   simple_symbol[...advanced indexing...]
   
   # and we can throw error on grouped symbol when simple() is called
   grouped.simple() # throws exception
   ```
 

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] tqchen commented on a change in pull request #7698: Second order gradient and Subgraph execution

2017-09-15 Thread git
tqchen commented on a change in pull request #7698: Second order gradient and 
Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139279115
 
 

 ##
 File path: include/mxnet/imperative.h
 ##
 @@ -0,0 +1,214 @@
+/*
+ * 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.
+ */
+
+#ifndef MXNET_IMPERATIVE_H_
+#define MXNET_IMPERATIVE_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "./ndarray.h"
+
+namespace mxnet {
+/*! \brief runtime functions for NDArray */
+class Imperative {
+ public:
+  class CachedOp {
+   public:
+explicit CachedOp(const nnvm::Symbol& sym);
+uint32_t num_inputs() {
+  return fwd_graph_.indexed_graph().input_nodes().size();
+}
+uint32_t num_outputs() {
+  return fwd_graph_.outputs.size();
+}
+uint32_t num_backward_inputs() {
+  return bwd_ograd_dep_.size() + bwd_in_dep_.size() + bwd_out_dep_.size();
+}
+std::vector& save_inputs() {
+  return save_inputs_;
+}
+std::vector& save_outputs() {
+  return save_outputs_;
+}
+const std::unordered_set& mutable_input_nodes() {
+  return fwd_graph_.indexed_graph().mutable_input_nodes();
+}
+nnvm::Graph GetForwardGraph(const bool recording,
+const std::vector& inputs);
+nnvm::Graph GetBackwardGraph(const OpStatePtr& state,
+ const std::vector& reqs,
+ const std::vector& inputs);
+std::vector Gradient(const nnvm::NodePtr& node,
+  const std::vector& 
ograds);
+OpStatePtr Forward(const std::vector& inputs,
+   const std::vector& outputs);
+void Backward(const bool retain_graph,
+  const OpStatePtr& state,
+  const std::vector& inputs,
+  const std::vector& reqs,
+  const std::vector& outputs);
+
+   private:
+struct CachedOpState {
+  std::vector buff;
+  std::vector states;
+};
+std::mutex mutex_;
+nnvm::Graph fwd_graph_;
+nnvm::Graph grad_graph_;
+nnvm::Graph full_graph_;
 
 Review comment:
   i see, maybe add a comment here then why we need three graphs
 

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 #7910: add advanced indexing

2017-09-15 Thread git
szha commented on issue #7910: add advanced indexing
URL: https://github.com/apache/incubator-mxnet/pull/7910#issuecomment-329947462
 
 
   If we introduce a non-grouped symbol class which can only be obtained from a 
method of non-grouped symbols, we can introduce slicing on that non-grouped 
symbol class. For example,
   ```python
   simple_symbol = regular_symbol.simple()
   simple_symbol[...advanced indexing...]
   
   # and we can throw error on grouped symbol when simple() is called
   grouped.simple() # throws exception
   ```
 

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] yajiedesign commented on issue #7910: add advanced indexing

2017-09-15 Thread git
yajiedesign commented on issue #7910: add advanced indexing
URL: https://github.com/apache/incubator-mxnet/pull/7910#issuecomment-329945607
 
 
   only work with 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] liuzhi136 closed issue #7894: The Meaning of parameters of mxnet.gluon.Embedding function

2017-09-15 Thread git
liuzhi136 closed issue #7894: The Meaning of parameters of 
mxnet.gluon.Embedding function
URL: https://github.com/apache/incubator-mxnet/issues/7894
 
 
   
 

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 commented on issue #7894: The Meaning of parameters of mxnet.gluon.Embedding function

2017-09-15 Thread git
liuzhi136 commented on issue #7894: The Meaning of parameters of 
mxnet.gluon.Embedding function
URL: 
https://github.com/apache/incubator-mxnet/issues/7894#issuecomment-329943591
 
 
   Ok, Thanks.
 

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 commented on issue #7894: The Meaning of parameters of mxnet.gluon.Embedding function

2017-09-15 Thread git
liuzhi136 commented on issue #7894: The Meaning of parameters of 
mxnet.gluon.Embedding function
URL: 
https://github.com/apache/incubator-mxnet/issues/7894#issuecomment-329943100
 
 
   But these two parameter below the Input shape: I'm thinking if it stands for 
the (num_word, vocab_size), that is it stands for the number of words and 
vocabulary size.
 

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] eldercrow commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
eldercrow commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329941126
 
 
   From your error message, it seems that cropping is unnecessary since 
data_shape[3] - out_shape[3] is 0. 
   ```
   src/operator/./crop-inl.h:139: Check failed: param_.offset[1] <= 
data_shape[3]-out_shape[3] (8 vs. 0) offset[1] should be less than the residual 
space of width
   ```
 

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 #7894: The Meaning of parameters of mxnet.gluon.Embedding function

2017-09-15 Thread git
szha commented on issue #7894: The Meaning of parameters of 
mxnet.gluon.Embedding function
URL: 
https://github.com/apache/incubator-mxnet/issues/7894#issuecomment-329940221
 
 
   sorry for the delay. @liuzhi136 
   they don't have meaning and can be arbitrary numbers
 

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 #7912: Do I need to change grad_req when sharing weights?

2017-09-15 Thread git
piiswrong commented on issue #7912: Do I need to change grad_req when sharing 
weights?
URL: 
https://github.com/apache/incubator-mxnet/issues/7912#issuecomment-329939400
 
 
   no need to use add. it's automatic within one executor
 

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 commented on issue #7894: The Meaning of parameters of mxnet.gluon.Embedding function

2017-09-15 Thread git
liuzhi136 commented on issue #7894: The Meaning of parameters of 
mxnet.gluon.Embedding function
URL: 
https://github.com/apache/incubator-mxnet/issues/7894#issuecomment-329938199
 
 
   @szha Do you know these parameters' meaning?
 

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] liyi14 opened a new issue #7912: Do I need to change grad_req when sharing weights?

2017-09-15 Thread git
liyi14 opened a new issue #7912: Do I need to change grad_req when sharing 
weights?
URL: https://github.com/apache/incubator-mxnet/issues/7912
 
 
   Hi, I was building a conv layer sharing weights with another one, using the  
#557. Since the default grad_req is 'write' and I need to update the weights 
using the gradient from both of the two conv layer, do I need to change it to 
'add'? Will it have some affect on other layers or say can I limit the 'add' 
req only only the shared weights?
   Thanks.
 

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 #7911: more sparse related docs

2017-09-15 Thread git
eric-haibin-lin opened a new pull request #7911: more sparse related docs
URL: https://github.com/apache/incubator-mxnet/pull/7911
 
 
   Preview at 
http://ec2-54-187-32-207.us-west-2.compute.amazonaws.com/api/python/ndarray/sparse.html
 
   

   
 

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] vuvko commented on issue #7909: Dividing input changes BatchNorm output

2017-09-15 Thread git
vuvko commented on issue #7909: Dividing input changes BatchNorm output
URL: 
https://github.com/apache/incubator-mxnet/issues/7909#issuecomment-329932411
 
 
   Ok, so the problem I loading model for testing and in that case parameter 
`use_global_stats` is just ignored (as set to `True`)
 

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] cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139268501
 
 

 ##
 File path: python/mxnet/optimizer.py
 ##
 @@ -665,26 +667,46 @@ class AdaGrad(Optimizer):
 eps: float, optional
 Small value to avoid division by 0.
 """
-def __init__(self, eps=1e-7, **kwargs):
+def __init__(self, eps=1e-7, stype='default', **kwargs):
 super(AdaGrad, self).__init__(**kwargs)
 self.float_stable_eps = eps
+self.stype = stype
 
 def create_state(self, index, weight):
-return zeros(weight.shape, weight.context)  # history
+return zeros(weight.shape, weight.context, stype=self.stype)  # history
 
 Review comment:
   they don't, actually. I get update calls for sized-1 dense weights along 
with the sparse ones. is the update not expected to occur then? Because the 
non-sparse version updates 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] eric-haibin-lin commented on issue #7847: Bug on Multi GPU : probably Invalid initialization of optimizer

2017-09-15 Thread git
eric-haibin-lin commented on issue #7847: Bug on Multi GPU : probably Invalid 
initialization of optimizer
URL: 
https://github.com/apache/incubator-mxnet/issues/7847#issuecomment-329926044
 
 
   I'll update module to throw proper warning/error messages for such 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


[GitHub] cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139268189
 
 

 ##
 File path: python/mxnet/optimizer.py
 ##
 @@ -665,26 +667,46 @@ class AdaGrad(Optimizer):
 eps: float, optional
 Small value to avoid division by 0.
 """
-def __init__(self, eps=1e-7, **kwargs):
+def __init__(self, eps=1e-7, stype='default', **kwargs):
 
 Review comment:
   ?
 

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] vuvko commented on issue #7909: Dividing input changes BatchNorm output

2017-09-15 Thread git
vuvko commented on issue #7909: Dividing input changes BatchNorm output
URL: 
https://github.com/apache/incubator-mxnet/issues/7909#issuecomment-329925746
 
 
   Also if this can help, I used [this](https://i.imgur.com/XJOBiiO.jpg) image 
for testing.
 

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] cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139267799
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cu
 ##
 @@ -36,21 +36,21 @@ NNVM_REGISTER_OP(_backward_add)
   ElemwiseBinaryOp::BackwardUseNoneWithHalf2);
 
-NNVM_REGISTER_OP(_sub)
+NNVM_REGISTER_OP(elemwise_sub)
 
 Review comment:
   not that I know of. I don't think anyone using cpp-package uses these sort 
of operators.
   The naming inconsistency between elemwise_sub and the other similar three is 
nonsensical.
 

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 #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139218368
 
 

 ##
 File path: python/mxnet/optimizer.py
 ##
 @@ -665,26 +667,46 @@ class AdaGrad(Optimizer):
 eps: float, optional
 Small value to avoid division by 0.
 """
-def __init__(self, eps=1e-7, **kwargs):
+def __init__(self, eps=1e-7, stype='default', **kwargs):
 super(AdaGrad, self).__init__(**kwargs)
 self.float_stable_eps = eps
+self.stype = stype
 
 def create_state(self, index, weight):
-return zeros(weight.shape, weight.context)  # history
+return zeros(weight.shape, weight.context, stype=self.stype)  # history
 
 def update(self, index, weight, grad, state):
+#print("ENTER ADAGRAD UPDATE")
 assert(isinstance(weight, NDArray))
 assert(isinstance(grad, NDArray))
 self._update_count(index)
 lr = self._get_lr(index)
 wd = self._get_wd(index)
-
+save_grad_stype = grad.stype
 grad = grad * self.rescale_grad
 if self.clip_gradient is not None:
 grad = clip(grad, -self.clip_gradient, self.clip_gradient)
 history = state
-history[:] += (grad * grad)
-weight[:] += -lr * (grad / sqrt(history + self.float_stable_eps) + wd 
* weight)
+save_history_stype = history.stype
+
+is_sparse = True if weight.stype != 'default' or grad.stype != 
'default' else False
 
 Review comment:
   is_sparse = true iff w.stype == g.stype == state.stype==row_sparse
 

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 #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139217684
 
 

 ##
 File path: python/mxnet/optimizer.py
 ##
 @@ -665,26 +667,46 @@ class AdaGrad(Optimizer):
 eps: float, optional
 Small value to avoid division by 0.
 """
-def __init__(self, eps=1e-7, **kwargs):
 
 Review comment:
   Please update the documentation the same way as Adam/SGD
 

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 #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139217161
 
 

 ##
 File path: python/mxnet/optimizer.py
 ##
 @@ -665,26 +667,46 @@ class AdaGrad(Optimizer):
 eps: float, optional
 Small value to avoid division by 0.
 """
-def __init__(self, eps=1e-7, **kwargs):
+def __init__(self, eps=1e-7, stype='default', **kwargs):
 super(AdaGrad, self).__init__(**kwargs)
 self.float_stable_eps = eps
+self.stype = stype
 
 def create_state(self, index, weight):
-return zeros(weight.shape, weight.context)  # history
+return zeros(weight.shape, weight.context, stype=self.stype)  # history
 
 Review comment:
   Please create the state based on weight.stype. The states should always have 
the same stype as the weight. Perform sparse update only when w.stype == 
g.stype == state.stype
 

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 #7772: Use memcopy instead of assigning each individual element

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7772: Use memcopy 
instead of assigning each individual element
URL: https://github.com/apache/incubator-mxnet/pull/7772#discussion_r139259687
 
 

 ##
 File path: src/operator/tensor/cast_storage-inl.h
 ##
 @@ -120,9 +119,13 @@ struct CastStorageRspDnsKernel {
 IType rid = idx[i];
 dim_t dns_offset = rid * row_length;
 dim_t rsp_offset = i * row_length;
-for (dim_t col = 0; col < row_length; col++) {
-  dns[dns_offset + col] = data[rsp_offset + col];
-}
+#if defined(__CUDACC__)
+  for (dim_t col = 0; col < row_length; col++) {
+dns[dns_offset + col] = data[rsp_offset + col];
+  }
+#else
+  memcpy(dns + dns_offset, data + rsp_offset, sizeof(DType) * row_length);
 
 Review comment:
   Sorry about that. The CI is not very stable recently. 
 

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: Second order gradient and Subgraph execution

2017-09-15 Thread git
piiswrong commented on a change in pull request #7698: Second order gradient 
and Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139259449
 
 

 ##
 File path: include/mxnet/imperative.h
 ##
 @@ -0,0 +1,214 @@
+/*
+ * 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.
+ */
+
+#ifndef MXNET_IMPERATIVE_H_
+#define MXNET_IMPERATIVE_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "./ndarray.h"
+
+namespace mxnet {
+/*! \brief runtime functions for NDArray */
+class Imperative {
+ public:
+  class CachedOp {
+   public:
+explicit CachedOp(const nnvm::Symbol& sym);
+uint32_t num_inputs() {
+  return fwd_graph_.indexed_graph().input_nodes().size();
+}
+uint32_t num_outputs() {
+  return fwd_graph_.outputs.size();
+}
+uint32_t num_backward_inputs() {
+  return bwd_ograd_dep_.size() + bwd_in_dep_.size() + bwd_out_dep_.size();
+}
+std::vector& save_inputs() {
+  return save_inputs_;
+}
+std::vector& save_outputs() {
+  return save_outputs_;
+}
+const std::unordered_set& mutable_input_nodes() {
+  return fwd_graph_.indexed_graph().mutable_input_nodes();
+}
+nnvm::Graph GetForwardGraph(const bool recording,
+const std::vector& inputs);
+nnvm::Graph GetBackwardGraph(const OpStatePtr& state,
+ const std::vector& reqs,
+ const std::vector& inputs);
+std::vector Gradient(const nnvm::NodePtr& node,
+  const std::vector& 
ograds);
+OpStatePtr Forward(const std::vector& inputs,
+   const std::vector& outputs);
+void Backward(const bool retain_graph,
+  const OpStatePtr& state,
+  const std::vector& inputs,
+  const std::vector& reqs,
+  const std::vector& outputs);
+
+   private:
+struct CachedOpState {
+  std::vector buff;
+  std::vector states;
+};
+std::mutex mutex_;
+nnvm::Graph fwd_graph_;
+nnvm::Graph grad_graph_;
+nnvm::Graph full_graph_;
 
 Review comment:
   what segment? Depending on reqs, the gradient graph may need to be 
reconstructed
 

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 #7910: add advanced indexing

2017-09-15 Thread git
piiswrong opened a new pull request #7910: add advanced indexing
URL: https://github.com/apache/incubator-mxnet/pull/7910
 
 
   
 

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 #7893: Add barriers in kvstore init

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7893: Add barriers in 
kvstore init
URL: https://github.com/apache/incubator-mxnet/pull/7893#discussion_r139257114
 
 

 ##
 File path: src/kvstore/kvstore_dist.h
 ##
 @@ -147,8 +147,11 @@ class KVStoreDist : public KVStoreLocal {
   for (const auto& v : values) {
 v.WaitToWrite();
   }
+  // wait for rank 0
+  Barrier();
 } else {
-  // do nothing
+  // wait for rank 0
+  Barrier();
 }
 if (!ps::Postoffice::Get()->is_recovery()) {
 
 Review comment:
   The `Barrier()` call at line 157 should be sufficient? 
 

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] asmushetzel commented on issue #7883: cuda support for new linear algebra operators

2017-09-15 Thread git
asmushetzel commented on issue #7883: cuda support for new linear algebra 
operators
URL: https://github.com/apache/incubator-mxnet/pull/7883#issuecomment-329896956
 
 
   So this is done now. From my point of view, it can be merged. 
 

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 #7146: How to compile Amalgamation for android?

2017-09-15 Thread git
eric-haibin-lin commented on issue #7146: How to compile Amalgamation for 
android?
URL: 
https://github.com/apache/incubator-mxnet/issues/7146#issuecomment-329883455
 
 
   @arank
   
   
   On 2017?9?13?, at 02:50, IceBo  wrote:
   
   where should copy the libc++_shared.so to? I copy it to jniLibs/armeabi and 
write System.loadBinary("c++_shared"); in Predictor.java, but the app will stop 
when opening.
   
   ?
   You are receiving this because you are subscribed to this thread.
   Reply to this email directly, view it on GitHub, or mute the thread.
   
   
 

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 #7888: Distributed multi-GPU training -- hangs for certain batch_size, epoch_number combinations.

2017-09-15 Thread git
eric-haibin-lin commented on issue #7888: Distributed multi-GPU training -- 
hangs for certain batch_size, epoch_number combinations.
URL: 
https://github.com/apache/incubator-mxnet/issues/7888#issuecomment-329877057
 
 
   Many iterators inherit from PrefetcherIter such as ImageRecordIter
   
   On 2017?9?15? ?? at 10:30 Da Zheng  wrote:
   
   > Does MXNet prefetch data by default in the distributed setting? I see
   > there is a data iterator called PrefetchingIter, but it is rarely being
   > used.
   >
   > ?
   > You are receiving this because you commented.
   >
   >
   > Reply to this email directly, view it on GitHub
   > 
,
   > or mute the thread
   > 

   > .
   >
   -- 
   Best Regards,
   Haibin Lin
   
   Department of Computer Science
   School of Computer Science
   Carnegie Mellon University
   
 

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: Second order gradient and Subgraph execution

2017-09-15 Thread git
piiswrong commented on a change in pull request #7698: Second order gradient 
and Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139220420
 
 

 ##
 File path: src/c_api/c_api_function.cc
 ##
 @@ -162,38 +162,35 @@ int MXCustomFunctionRecord(int num_inputs, NDArrayHandle 
*inputs,
MXCallbackList *callbacks) {
   using namespace mxnet;
   using namespace mxnet::custom_function;
-  using mxnet::autograd::AutogradRuntime;
 
 Review comment:
   This is only used by autograd.Function
 

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 a change in pull request #7698: Second order gradient and Subgraph execution

2017-09-15 Thread git
szha commented on a change in pull request #7698: Second order gradient and 
Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139209590
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -236,39 +256,96 @@ def backward(heads, head_grads=None, retain_graph=False, 
train_mode=True): #pyli
 train_mode: bool, optional
 Whether to do backward for training or predicting.
 """
-if isinstance(heads, NDArray):
-assert head_grads is None or isinstance(head_grads, NDArray)
-heads = [heads]
-head_grads = [head_grads] if head_grads is not None else None
+head_handles, hgrad_handles = _parse_head(heads, head_grads)
 
-output_handles = []
-for arr in heads:
-output_handles.append(arr.handle)
+check_call(_LIB.MXAutogradBackwardEx(
+len(head_handles),
+head_handles,
+hgrad_handles,
+0,
+ctypes.c_void_p(0),
+ctypes.c_int(retain_graph),
+ctypes.c_int(0),
+ctypes.c_int(train_mode),
+ctypes.c_void_p(0),
+ctypes.c_void_p(0)))
 
-if head_grads is None:
-check_call(_LIB.MXAutogradBackwardEx(
-len(output_handles),
-c_array(NDArrayHandle, output_handles),
-ctypes.c_void_p(0),
-ctypes.c_int(retain_graph),
-ctypes.c_int(train_mode)))
-return
-
-ograd_handles = []
-for arr in head_grads:
-if arr is not None:
-ograd_handles.append(arr.handle)
-else:
-ograd_handles.append(NDArrayHandle(0))
-assert len(ograd_handles) == len(output_handles), \
-"heads and head_grads must have the same length"
+
+def grad(heads, variables, head_grads=None, retain_graph=None, 
create_graph=False,
+ train_mode=True):  #pylint: disable=redefined-outer-name
+"""Compute the gradients of heads w.r.t variables. Gradients will be
+returned as new NDArrays instead of stored into `variable.grad`.
+Supports recording gradient graph for computing higher order gradients.
+
+.. Note: Currently only a very limited set of operators support higher 
order
+gradients.
+
+Parameters
+--
+heads: NDArray or list of NDArray
+Output NDArray(s)
+variables: NDArray or list of NDArray
+Input variables to compute gradients for.
+head_grads: NDArray or list of NDArray or None
+Gradients with respect to heads.
+retain_graph: bool
+Whether to keep computation graph to differentiate again, instead
+of clearing history and release memory. Defaults to the same value
+as create_graph.
+create_graph: bool
+Whether to record gradient graph for computing higher order
+train_mode: bool, optional
+Whether to do backward for training or prediction.
+
+Returns
+---
+NDArray or list of NDArray:
+Gradients with respect to variables.
+
+Examples
+
+>>> x = mx.nd.ones((1,))
+>>> x.attach_grad()
+>>> with mx.autograd.record():
+... z = mx.nd.elemwise_add(mx.nd.exp(x), x)
+>>> dx = mx.autograd.grad(z, [x], create_graph=True)
+>>> dx.backward()
+>>> print(dx.grad)
+[
+[ 3.71828175]
+]
+"""
+head_handles, hgrad_handles = _parse_head(heads, head_grads)
+
+if isinstance(variables, NDArray):
+var_handles = [variables.handle]
+else:
+assert len(variables), "variables cannot be an empty list."
+var_handles = [i.handle for i in variables]
+var_handles = c_array(NDArrayHandle, var_handles)
+
+retain_graph = retain_graph if retain_graph is not None else create_graph
+grad_vars = ctypes.POINTER(NDArrayHandle)()
+grad_stypes = ctypes.POINTER(ctypes.c_int)()
 
 check_call(_LIB.MXAutogradBackwardEx(
-len(output_handles),
-c_array(NDArrayHandle, output_handles),
-c_array(NDArrayHandle, ograd_handles),
+len(head_handles),
+head_handles,
+hgrad_handles,
+len(var_handles),
+var_handles,
 ctypes.c_int(retain_graph),
-ctypes.c_int(train_mode)))
+ctypes.c_int(create_graph),
+ctypes.c_int(train_mode),
+ctypes.byref(grad_vars),
+ctypes.byref(grad_stypes)))
+
+ret = [_ndarray_cls(ctypes.cast(grad_vars[i], NDArrayHandle),
+stype=grad_stypes[i])
+   for i in range(len(variables))]
+if isinstance(variables, NDArray):
 
 Review comment:
   If variables is NDArray, isn't len(variables) the size of the first 
dimension? Why do you need that 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,

[GitHub] szha commented on a change in pull request #7698: Second order gradient and Subgraph execution

2017-09-15 Thread git
szha commented on a change in pull request #7698: Second order gradient and 
Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139211509
 
 

 ##
 File path: python/mxnet/ndarray/sparse.py
 ##
 @@ -871,7 +871,7 @@ def _ndarray_cls(handle, writable=True, 
stype=_STORAGE_TYPE_UNDEFINED):
 elif stype == _STORAGE_TYPE_ROW_SPARSE:
 return RowSparseNDArray(handle, writable=writable)
 else:
-raise Exception("unknown storage type")
+raise Exception("unknown storage type: %s"%stype)
 
 Review comment:
   Also wouldn't it be easier to have an enum to class mapping for different 
NDArray classes, since all classes other than the undefined type are already 
called with the same signature?
 

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: [sparse] add ftrl optimizer for sparse (#7720)

2017-09-15 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 e81a3a8  [sparse] add ftrl optimizer for sparse (#7720)
e81a3a8 is described below

commit e81a3a88abaa2c4847602dfb2864e05adc5a5f56
Author: CNevd 
AuthorDate: Sat Sep 16 02:25:13 2017 +0800

[sparse] add ftrl optimizer for sparse (#7720)

* add sparse ftrl optimizer

* add back

* update

* update

* update

* update

* Update optimizer.py
---
 python/mxnet/optimizer.py   |  57 ++---
 src/operator/optimizer_op-inl.h | 207 
 src/operator/optimizer_op.cc|  40 ++
 src/operator/optimizer_op.cu|   4 +
 tests/python/unittest/test_optimizer.py |  72 +++
 5 files changed, 360 insertions(+), 20 deletions(-)

diff --git a/python/mxnet/optimizer.py b/python/mxnet/optimizer.py
index d39c7f5..ec0a1d4 100644
--- a/python/mxnet/optimizer.py
+++ b/python/mxnet/optimizer.py
@@ -24,9 +24,9 @@ import logging
 import warnings
 import numpy
 from .base import py_str
-from .ndarray import (NDArray, zeros, clip, sqrt, sign, array, maximum, abs as 
NDabs)
+from .ndarray import (NDArray, zeros, clip, sqrt, array, maximum, abs as NDabs)
 from .ndarray import (sgd_update, sgd_mom_update, adam_update, rmsprop_update, 
rmspropalex_update,
-  mp_sgd_update, mp_sgd_mom_update)
+  mp_sgd_update, mp_sgd_mom_update, ftrl_update)
 from .random import normal
 
 
@@ -811,6 +811,7 @@ class AdaDelta(Optimizer):
 weight[:] -= current_delta + wd * weight
 
 #pylint: disable=invalid-name
+#pylint: disable=line-too-long
 @register
 class Ftrl(Optimizer):
 """The Ftrl optimizer.
@@ -818,6 +819,31 @@ class Ftrl(Optimizer):
 Referenced from *Ad Click Prediction: a View from the Trenches*, available 
at
 http://dl.acm.org/citation.cfm?id=2488200.
 
+eta :
+.. math::
+   \\eta_{t,i} = 
\\frac{learningrate}{\\beta+\\sqrt{\\sum_{s=1}^tg_{s,i}^2}}
+
+The optimizer updates the weight by::
+
+rescaled_grad = clip(grad * rescale_grad, clip_gradient)
+z += rescaled_grad - (sqrt(n + rescaled_grad**2) - sqrt(n)) * weight / 
learning_rate
+n += rescaled_grad**2
+w = (sign(z) * lamda1 - z) / ((beta + sqrt(n)) / learning_rate + wd) * 
(abs(z) > lamda1)
+
+If the storage types of weight, state and grad are all ``row_sparse``, \
+sparse updates are applied by::
+
+for row in grad.indices:
+rescaled_grad[row] = clip(grad[row] * rescale_grad, clip_gradient)
+z[row] += rescaled_grad[row] - (sqrt(n[row] + 
rescaled_grad[row]**2) - sqrt(n[row])) * weight[row] / learning_rate
+n[row] += rescaled_grad[row]**2
+w[row] = (sign(z[row]) * lamda1 - z[row]) / ((beta + sqrt(n[row])) 
/ learning_rate + wd) * (abs(z[row]) > lamda1)
+
+For details of the update algorithm, see 
:class:`~mxnet.ndarray.ftrl_update`.
+
+This optimizer accepts the following parameters in addition to those 
accepted
+by :class:`.Optimizer`.
+
 Parameters
 --
 lamda1 : float, optional
@@ -826,9 +852,6 @@ class Ftrl(Optimizer):
 The initial learning rate.
 beta : float, optional
 Per-coordinate learning rate correlation parameter.
-eta :
-.. math::
-   \\eta_{t,i} = 
\\frac{learningrate}{\\beta+\\sqrt{\\sum_{s=1}^tg_{s,i}^t}}
 """
 
 def __init__(self, lamda1=0.01, learning_rate=0.1, beta=1, **kwargs):
@@ -838,8 +861,8 @@ class Ftrl(Optimizer):
 self.lr = learning_rate
 
 def create_state(self, index, weight):
-return (zeros(weight.shape, weight.context),  # dn
-zeros(weight.shape, weight.context))  # n
+return (zeros(weight.shape, weight.context, stype=weight.stype),  # z
+zeros(weight.shape, weight.context, stype=weight.stype))  # n
 
 def update(self, index, weight, grad, state):
 assert(isinstance(weight, NDArray))
@@ -848,22 +871,16 @@ class Ftrl(Optimizer):
 wd = self._get_wd(index)
 lr = self._get_lr(index)
 
-# preprocess grad
-grad *= self.rescale_grad
-if self.clip_gradient is not None:
-grad = clip(grad, -self.clip_gradient, self.clip_gradient)
+kwargs = {'lamda1': self.lamda1, 'beta': self.beta, 'rescale_grad': 
self.rescale_grad}
+if self.clip_gradient:
+kwargs['clip_gradient'] = self.clip_gradient
 
 # accumulated g and delta initialization
-dn, n = state
-
-#update dn, n
-dn += grad - (sqrt(n + grad * grad) - sqrt(n)) * weight / lr
-n += grad * grad
-
-# update weight
-weight[:] = (sign(dn) * 

[GitHub] piiswrong closed pull request #7720: [sparse] add ftrl optimizer for sparse

2017-09-15 Thread git
piiswrong closed pull request #7720: [sparse] add ftrl optimizer for sparse
URL: https://github.com/apache/incubator-mxnet/pull/7720
 
 
   
 

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 #7832: Elementwise Sum (add_n) for rowsparse on GPU

2017-09-15 Thread git
piiswrong closed pull request #7832: Elementwise Sum (add_n) for rowsparse on 
GPU
URL: https://github.com/apache/incubator-mxnet/pull/7832
 
 
   
 

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 #7875: add mobilenet to gluon model zoo

2017-09-15 Thread git
piiswrong commented on a change in pull request #7875: add mobilenet to gluon 
model zoo
URL: https://github.com/apache/incubator-mxnet/pull/7875#discussion_r139216969
 
 

 ##
 File path: python/mxnet/gluon/model_zoo/vision/mobilenet.py
 ##
 @@ -0,0 +1,158 @@
+# 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.
+
+# coding: utf-8
+# pylint: disable= arguments-differ
+"""MobileNet, implemented in Gluon."""
+__all__ = ['MobileNet', 'mobilenet1_0', 'mobilenet0_75', 'mobilenet0_5', 
'mobilenet0_25',
+   'get_mobilenet']
+
+from context import cpu
+from ...block import HybridBlock
+from ... import nn
+
+# Helpers
+def _add_conv(out, channels=1, kernel=1, stride=1, pad=0, num_group=1):
+out.add(nn.Conv2D(channels, kernel, stride, pad, groups=num_group, 
use_bias=False))
+out.add(nn.BatchNorm(scale=False))
+out.add(nn.Activation('relu'))
+
+def _add_conv_dw(out, dw_channels, channels, stride):
+_add_conv(out, channels=dw_channels, kernel=3, stride=stride, pad=1, 
num_group=dw_channels)
+_add_conv(out, channels=channels)
+
+
+# Net
+class MobileNet(HybridBlock):
+r"""MobileNet model from the
+`"MobileNets: Efficient Convolutional Neural Networks for Mobile Vision 
Applications"
+`_ paper.
+
+Parameters
+--
+multiplier : float, default 1.0
+The width multiplier for controling the model size. Only multipliers 
that are no
+less than 0.25 are supported. The actual number of channels is equal 
to the original
+channel size multiplied by this multiplier.
+classes : int, default 1000
+Number of classes for the output layer.
+"""
+def __init__(self, multiplier=1.0, classes=1000, **kwargs):
+super(MobileNet, self).__init__(**kwargs)
+with self.name_scope():
+self.features = nn.HybridSequential(prefix='')
+with self.features.name_scope():
+_add_conv(self.features, channels=int(32*multiplier), 
kernel=3, pad=1, stride=2)
+dw_channels = [int(x*multiplier) for x in [32, 
64]+[128]*2+[256]*2+[512]*6+[1024]]
+channels = [int(x*multiplier) for x in 
[64]+[128]*2+[256]*2+[512]*6+[1024]*2]
+stride = [1, 2] * 3 + [1] * 5 + [2, 1]
+for dw_channels, channels, stride in zip(dw_channels, 
channels, stride):
 
 Review comment:
   Use a different name for loop variables
 

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 #7899: Need help: numpy array to mxnet ndarray is too slow.

2017-09-15 Thread git
madjam commented on issue #7899: Need help: numpy array to mxnet ndarray is too 
slow.
URL: 
https://github.com/apache/incubator-mxnet/issues/7899#issuecomment-329849612
 
 
   How big is `img_data` and `label_data`?
   FYI: this involves allocating memory and copying contents of numpy array 
into the allocated memory.
   How is this step slowing down your training? how often are you doing this 
copy?
 

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: Second order gradient and Subgraph execution

2017-09-15 Thread git
piiswrong commented on a change in pull request #7698: Second order gradient 
and Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139207816
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cu
 ##
 @@ -36,21 +36,21 @@ NNVM_REGISTER_OP(_backward_add)
   ElemwiseBinaryOp::BackwardUseNoneWithHalf2);
 
-NNVM_REGISTER_OP(_sub)
+NNVM_REGISTER_OP(elemwise_sub)
 .set_attr("FCompute", ElemwiseBinaryOp::ComputeWithHalf2);
 
 NNVM_REGISTER_OP(_backward_sub)
 .set_attr("FCompute", 
ElemwiseBinaryOp::BackwardUseNoneWithHalf2<
   gpu, mshadow_op::identity, mshadow_op::negation>);
 
-NNVM_REGISTER_OP(_mul)
+NNVM_REGISTER_OP(elemwise_mul)
 .set_attr("FCompute", ElemwiseBinaryOp::ComputeWithHalf2);
 
 NNVM_REGISTER_OP(_backward_mul)
 .set_attr("FCompute",
   ElemwiseBinaryOp::BackwardUseInWithHalf2);
 
-NNVM_REGISTER_OP(_div)
+NNVM_REGISTER_OP(elemwise_div)
 
 Review comment:
   This is fixing a bug introduced by chris. _div is renamed in .cc but not in 
.cu
 

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] zheng-da commented on issue #7888: Distributed multi-GPU training -- hangs for certain batch_size, epoch_number combinations.

2017-09-15 Thread git
zheng-da commented on issue #7888: Distributed multi-GPU training -- hangs for 
certain batch_size, epoch_number combinations.
URL: 
https://github.com/apache/incubator-mxnet/issues/7888#issuecomment-329847276
 
 
   Does MXNet prefetch data by default in the distributed setting? I see there 
is a data iterator called PrefetchingIter, but it is rarely being 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] FrancisTse8 commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3

2017-09-15 Thread git
FrancisTse8 commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: 
https://github.com/apache/incubator-mxnet/issues/7852#issuecomment-329847054
 
 
   OK, I am on the Raspberry Pi 3 running jessie to try to install MXNet. 
   
   Followed the instructions on 
https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/ to install 
docker:
   ```bash
   curl -sSL https://get.docker.com | sh
   ```
   
   Downloaded the appropriate dockerfile and modified it to enable openCV. See 
below (file renamed with .txt to attach here):
   
[Dockerfile.build.armv7.withOpenCV.txt](https://github.com/apache/incubator-mxnet/files/1307112/Dockerfile.build.armv7.withOpenCV.txt)
   
   Verified that docker was installed and I have the the dockerfile I needed:
   ```bash
   pi@raspberrypi:~ $ which docker
   /usr/bin/docker
   pi@raspberrypi:~ $ ls dockerfiles
   Dockerfile.build.armv7.withOpenCV
   ```
   
   However, when I ran the docker build, I got a permission denied error:
   ```bash
   pi@raspberrypi:~ $ docker build -f 
dockerfiles/Dockerfile.build.armv7.withOpenCV -t mxnet .
   Got permission denied while trying to connect to the Docker daemon socket at 
unix:///var/run/docker.sock: Post 
http://%2Fvar%2Frun%2Fdocker.sock/v1.29/build?buildargs=%7B%7D=%5B%5D==0=0===0=dockerfiles%2FDockerfile.build.armv7.withOpenCV=%7B%7D=0=0=default=1=0=mxnet==null:
 dial unix /var/run/docker.sock: connect: permission denied
   ```
   
   Did I do something wrong or missed some kind of step?
   
   
 

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 #7903: Refactor AdaGrad optimizer to support sparse tensors

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7903: Refactor AdaGrad 
optimizer to support sparse tensors
URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139201606
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cu
 ##
 @@ -36,21 +36,21 @@ NNVM_REGISTER_OP(_backward_add)
   ElemwiseBinaryOp::BackwardUseNoneWithHalf2);
 
-NNVM_REGISTER_OP(_sub)
+NNVM_REGISTER_OP(elemwise_sub)
 
 Review comment:
   Doesn't this break backward compatibility in cpp package?
 

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 #7319: [RoadMap] Legacy issue resolution before 1.0 release

2017-09-15 Thread git
eric-haibin-lin commented on issue #7319: [RoadMap] Legacy issue resolution 
before 1.0 release
URL: 
https://github.com/apache/incubator-mxnet/issues/7319#issuecomment-329841537
 
 
   @formath Yes, I'll work on the sparse embedding operator to support at least 
millions of features after I am done with basic documentations for sparse. We 
do have a few sparse optimizers like 
[SGD](https://mxnet.incubator.apache.org/versions/master/api/python/optimization/optimization.html#mxnet.optimizer.SGD)
 and 
[Adam](https://mxnet.incubator.apache.org/versions/master/api/python/optimization/optimization.html#mxnet.optimizer.Adam).
 Ftrl and Adagrad are coming in #7720 #7903 
 

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] vuvko opened a new issue #7909: Dividing input changes BatchNorm output

2017-09-15 Thread git
vuvko opened a new issue #7909: Dividing input changes BatchNorm output
URL: https://github.com/apache/incubator-mxnet/issues/7909
 
 
   I was trying to experiment with ResNet-152 model downloaded from [Model 
Zoo](https://mxnet.incubator.apache.org/model_zoo/). For some reason first 
batch normalization vary it's output if I divide (or apply any other 
elementwise operation to) it's input.
   
   ## Environment info
   Operating System: ArchLinux 
   `
   Linux archshad 4.12.10-1-ARCH #1 SMP PREEMPT Wed Aug 30 12:18:42 CEST 2017 
x86_64 GNU/Linux
   `
   
   Compiler: 
   
   - `gcc (GCC) 7.2.0`
   - `gcc-5 (GCC) 5.4.0`
   - `Cuda compilation tools, release 8.0, V8.0.61`
   
   Package used (Python/R/Scala/Julia): Python
   
   MXNet version: 0.11.0 (behavior was the same on 0.10.0)
   
   Python version: `Python 3.6.2`, `Python 2.7.13`
   
   ## Minimum reproducible example
   I wrote 
[script](https://gist.github.com/vuvko/f46eac67a285f6f5040e630a87e5cd99) for 
checking outputs of model on test image.
   
   ## Steps to reproduce
   Run code from gist with some colored image saved resnet-152 model.
   
   ## What have you tried to solve it?
   
   Changing library versions, python version 
   
 

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 #7904: add warning to global norm clip

2017-09-15 Thread git
piiswrong commented on a change in pull request #7904: add warning to global 
norm clip
URL: https://github.com/apache/incubator-mxnet/pull/7904#discussion_r139200143
 
 

 ##
 File path: python/mxnet/gluon/utils.py
 ##
 @@ -113,11 +114,11 @@ def clip_global_norm(arrays, max_norm):
 """Rescales NDArrays so that the sum of their 2-norm is smaller than 
`max_norm`.
 """
 assert len(arrays) > 0
-total_norm = 0
-for arr in arrays:
-arr = arr.reshape((-1,))
-total_norm += ndarray.dot(arr, arr)
-total_norm = math.sqrt(total_norm.asscalar())
+total_norm = ndarray.add_n(*[ndarray.dot(x, x)
+ for x in (arr.reshape((-1,)) for arr in 
arrays)])
+total_norm = ndarray.sqrt(total_norm).asscalar()
+if not np.isfinite(total_norm):
+warnings.warn(UserWarning('nan or inf is detected. Clipping results 
will be undefined.'))
 
 Review comment:
   stacklevel = 2
 

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: Second order gradient and Subgraph execution

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7698: Second order 
gradient and Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139200011
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cu
 ##
 @@ -36,21 +36,21 @@ NNVM_REGISTER_OP(_backward_add)
   ElemwiseBinaryOp::BackwardUseNoneWithHalf2);
 
-NNVM_REGISTER_OP(_sub)
+NNVM_REGISTER_OP(elemwise_sub)
 .set_attr("FCompute", ElemwiseBinaryOp::ComputeWithHalf2);
 
 NNVM_REGISTER_OP(_backward_sub)
 .set_attr("FCompute", 
ElemwiseBinaryOp::BackwardUseNoneWithHalf2<
   gpu, mshadow_op::identity, mshadow_op::negation>);
 
-NNVM_REGISTER_OP(_mul)
+NNVM_REGISTER_OP(elemwise_mul)
 .set_attr("FCompute", ElemwiseBinaryOp::ComputeWithHalf2);
 
 NNVM_REGISTER_OP(_backward_mul)
 .set_attr("FCompute",
   ElemwiseBinaryOp::BackwardUseInWithHalf2);
 
-NNVM_REGISTER_OP(_div)
+NNVM_REGISTER_OP(elemwise_div)
 
 Review comment:
   Doesn't this break backward compatibility? @cjolivier01 @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] eric-haibin-lin commented on a change in pull request #7698: Second order gradient and Subgraph execution

2017-09-15 Thread git
eric-haibin-lin commented on a change in pull request #7698: Second order 
gradient and Subgraph execution
URL: https://github.com/apache/incubator-mxnet/pull/7698#discussion_r139199432
 
 

 ##
 File path: tests/python/unittest/test_autograd.py
 ##
 @@ -117,7 +117,7 @@ def check_unary_func(x):
 f_square_grad = lambda x: [2*x]
 autograd_assert(x, func=f_square, grad_func=f_square_grad)
 uniform = nd.uniform(shape=(4, 5))
-stypes = ['row_sparse', 'csr', 'default']
+stypes = ['default']  #,'row_sparse', 'csr']
 
 Review comment:
   ok
 

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 #7888: Distributed multi-GPU training -- hangs for certain batch_size, epoch_number combinations.

2017-09-15 Thread git
eric-haibin-lin commented on issue #7888: Distributed multi-GPU training -- 
hangs for certain batch_size, epoch_number combinations.
URL: 
https://github.com/apache/incubator-mxnet/issues/7888#issuecomment-329835104
 
 
   I've seen a similar issue before - during distributed training, each machine 
might get a different number of batches because MXNet prefetches data from the 
dataset. That means very likely for the last epoch, the one machine has a fewer 
number of batches than the other, and since it's dist-sync mode, the machine 
with more batches will wait for the other machine indefinitely. A temporary 
walk-around is to train n + 1 epochs and explicit break at the n-th epoch in 
the code.. 
   
 

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] chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329814975
 
 
   Thanks for your reply ..
   featmap_score = mx.symbol.Convolution(data=upsampling_featmap, kernel=(1, 
1), pad=(0, 0), stride = (1, 1),num_filter=num_classes, 
name="featmap_score",no_bias = True)  **# Dimensions (1,19,768,1024)**
   croped_score = mx.symbol.Crop(*[featmap_score, data], offset=(8, 8), 
name='croped_score') **# Dimensions (1,19,768,1024)**
   Crop is done so that for other datasets it should be compatible with i/p 
dimensions. In this scenario, before and after crop dimensions remains same 
since network is adjusted to work for this dataset i.e multiples of 2,4,8etc.
   **Hence kindly suggest if you have any ideas since iam trying hard** 
 

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] futurely commented on issue #658: Checkpoint every some iterations

2017-09-15 Thread git
futurely commented on issue #658: Checkpoint every some iterations
URL: https://github.com/apache/incubator-mxnet/issues/658#issuecomment-329803731
 
 
   The Gluon API does not need callback anymore.
   
https://github.com/apache/incubator-mxnet/blob/4044703afed6c9c6942674a42036b248710156e1/example/gluon/image_classification.py
 

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] jonbakerfish commented on issue #658: Checkpoint every some iterations

2017-09-15 Thread git
jonbakerfish commented on issue #658: Checkpoint every some iterations
URL: https://github.com/apache/incubator-mxnet/issues/658#issuecomment-329798467
 
 
   FYI: a checkpoint class for `batch_end_callback`:
   
   class BatchCheckpoint(object):
   def __init__(self, mod, prefix, period, save_optimizer_states=False):
   """checkpoint for batch_end_callback
   
   Parameters
   --
   mod : subclass of BaseModule
   The module to checkpoint.
   prefix : str
   The file prefix for this checkpoint.
   period : int
   How many batchs to wait before checkpointing.
   save_optimizer_states : bool
   Indicates whether or not to save optimizer states for 
continued training.
   
   Example
   ---
   >>> # save checkpoint every ten batches.
   >>> module.fit(iterator, num_epoch=n_epoch,
   ... batch_end_callback=callback.BatchCheckpoint(module, prefix, 
10))
   """
   self.mod = mod
   self.prefix = prefix
   self.period = period
   self.save_optimizer_states = save_optimizer_states
   
   def __call__(self, param):
   if (param.nbatch + 1) % self.period == 0:
   self.mod.save_checkpoint(self.prefix + 
'-e-%04d-b'%param.epoch, 
param.nbatch + 1, 
self.save_optimizer_states)
 

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] eldercrow commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
eldercrow commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329785144
 
 
   Sorry, I was meaning crop not concat. I suggest you to check the feature dim 
after crop layer. 
 

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] larroy commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3

2017-09-15 Thread git
larroy commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: 
https://github.com/apache/incubator-mxnet/issues/7852#issuecomment-329782023
 
 
   1. Yes you should install docker either way, from the os or with docker ce
   
   2. I would make sure the mxnet repository is clean not to have issues. 
Anything else doesn't matter as the build runs inside docker.
   
   3. right, and modify the dockerfile to install opencv-dev packages
   4. right, if you need something else just add it to the dockerfile
   
 

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] dping1 closed issue #6780: Problems with CNN model training and prediction for text classification

2017-09-15 Thread git
dping1 closed issue #6780: Problems with CNN model training and prediction for 
text classification
URL: https://github.com/apache/incubator-mxnet/issues/6780
 
 
   
 

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] chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329748836
 
 
   iam not using any concat layer, below is the code along with jupyter 
notebook producing dimensions.
   **Kindly pls suggest**...Im getting correct result in jupyter notebook but 
when the symbol is given for training, exception thrown
   **Code**
   num_classes = 19
   upscale_factor = 16   #Input (1024,48,64)
   interim_featmap = mx.symbol.Convolution(name='interim_featmap', 
data=relu_fc6, num_filter=upscale_factor*upscale_factor*num_classes, pad=(0,0), 
kernel=(1, 1), stride=(1, 1),no_bias=True) #(N,C*r^2,H,W)
   splitted = mx.symbol.reshape(name='splitted', data=interim_featmap, 
shape=(0, -4, -1, upscale_factor**2, 0, 0))   #(N, C, r^2, H, W)
   unflatten = mx.symbol.reshape(name='unflatten', data=splitted, shape=(0, 0, 
-4, upscale_factor, upscale_factor, 0, 0))  #(N, C, r, r, H, W)
   swapped = mx.symbol.transpose(name='swapped', data=unflatten, axes=(0, 1, 2, 
4, 3, 5)) # (N, C, H, r, W, r)
   upsampling_featmap = mx.symbol.reshape(name='upsampling_featmap', 
data=swapped, shape=(0, 0, -3, -3)) # (N, C, H*r, W*r)
   featmap_score = mx.symbol.Convolution(data=upsampling_featmap, kernel=(1, 
1), pad=(0, 0), stride = (1, 1),num_filter=num_classes, 
name="featmap_score",no_bias = True) #(1,19,768,1024)
   
   croped_score = mx.symbol.Crop(*[featmap_score, data], offset=(8, 8), 
name='croped_score') #(1,19,768,1024)
   softmax = mx.symbol.SoftmaxOutput(data=croped_score, label=seg_cls_gt, 
normalization='valid', multi_output=True,use_ignore=True, ignore_label=255, 
   
   - name="softmax")
   
   
 

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] chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329748836
 
 
   iam not using any concat layer, below is the code along with jupyter 
notebook producing dimensions.
   Kindly pls suggest...Im getting correct result in jupyter notebook but when 
the symbol is given for training, exception thrown
   **Code**
   num_classes = 19
   upscale_factor = 16   #Input (1024,48,64)
   interim_featmap = mx.symbol.Convolution(name='interim_featmap', 
data=relu_fc6, num_filter=upscale_factor*upscale_factor*num_classes, pad=(0,0), 
kernel=(1, 1), stride=(1, 1),no_bias=True) #(N,C*r^2,H,W)
   splitted = mx.symbol.reshape(name='splitted', data=interim_featmap, 
shape=(0, -4, -1, upscale_factor**2, 0, 0))   #(N, C, r^2, H, W)
   unflatten = mx.symbol.reshape(name='unflatten', data=splitted, shape=(0, 0, 
-4, upscale_factor, upscale_factor, 0, 0))  #(N, C, r, r, H, W)
   swapped = mx.symbol.transpose(name='swapped', data=unflatten, axes=(0, 1, 2, 
4, 3, 5)) # (N, C, H, r, W, r)
   upsampling_featmap = mx.symbol.reshape(name='upsampling_featmap', 
data=swapped, shape=(0, 0, -3, -3)) # (N, C, H*r, W*r)
   featmap_score = mx.symbol.Convolution(data=upsampling_featmap, kernel=(1, 
1), pad=(0, 0), stride = (1, 1),num_filter=num_classes, 
name="featmap_score",no_bias = True) #(1,19,768,1024)
   
   croped_score = mx.symbol.Crop(*[featmap_score, data], offset=(8, 8), 
name='croped_score') #(1,19,768,1024)
   softmax = mx.symbol.SoftmaxOutput(data=croped_score, label=seg_cls_gt, 
normalization='valid', multi_output=True,use_ignore=True, ignore_label=255, 
   
   - name="softmax")
   
   
 

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] novioleo opened a new issue #7908: mxnet_predict.so read the symbol json error

2017-09-15 Thread git
novioleo opened a new issue #7908: mxnet_predict.so read the symbol json error
URL: https://github.com/apache/incubator-mxnet/issues/7908
 
 
   ## Environment info
   Operating System:
   Ubuntu 16.04
   Compiler:
   arm-linux-androideabi-clang++ (arch = arm,api=21)
   
   i met a problem when i tried to use the latest mxnet_predcit.so in android.
   the latest predict.so can not load the symbol rightly.
   
   > 
   
   i upload my predict.so and the model json in my attachments.
   
   
[symbol.json.zip](https://github.com/apache/incubator-mxnet/files/1305754/symbol.json.zip)
   the mxnet_predict.so can not upload successfully,so i upload to BaiduYun:
   https://pan.baidu.com/s/1kVGFkDT
   
   any help is appreciate
   
   
 

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] eldercrow commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
eldercrow commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329717925
 
 
   Seems that the error is from a concat layer, but the function above has no 
concat layer. I guess you did something wrong in cropping your feature map. 
 

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] chowkamlee81 opened a new issue #7907: Dense upsamling operation rather than deconvolution implementation

2017-09-15 Thread git
chowkamlee81 opened a new issue #7907: Dense upsamling operation rather than 
deconvolution implementation
URL: https://github.com/apache/incubator-mxnet/issues/7907
 
 
   I developed a small snippet to replace deconvolution by Dense-up sampling 
operation according to mxnet example  
incubator-mxnet/example/gluon/super_resolution.py.
   
   
   My i/p is 1024*48*64
   My o/p required is 19*768*1024.
   
   Hence i did conv to produce (19*16*16)*48*64. Here upsampling factor is 16, 
num_classes=19
   Through your technique i got 19*768*1024 which is desired accordingly when i 
ran using jupyter notebook graphically diagram of network.
   But when i give this symbol for training, exception thrown below
   Kindly suggest and help pls
   
   " src/operator/./crop-inl.h:139: Check failed: param_.offset[1] <= 
data_shape[3]-out_shape[3] (8 vs. 0) offset[1] should be less than the residual 
space of width"
   
 

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] chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329711401
 
 
   @eldercrow , kindly suggest for this dense upsampling operation.
   
   My i/p is 1024x48x64
   My o/p required is 19*768*1024.
   
   Hence i did conv to produce (19*16*16)*48*64. Here upsampling factor is 16, 
num_classes=19
   Through your technique i got 19*768*1024 which is desired. But iam getting 
error during training. 
   **Kindly suggest**
 

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] asmushetzel commented on issue #7883: cuda support for new linear algebra operators

2017-09-15 Thread git
asmushetzel commented on issue #7883: cuda support for new linear algebra 
operators
URL: https://github.com/apache/incubator-mxnet/pull/7883#issuecomment-329710766
 
 
   Generally, all is there. Just that this code uses a cusolver-function that 
has been added with Cuda 8.0 and MxNet does builds on Cuda7.5. So I have to put 
in a workaround for disabling one operator cleanly on Cuda7.5 and also ensure 
that no GPU-tests are run on 7.5 for this operator. 
   Will put in a comment when this is done. 
 

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] chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329710361
 
 
   Hai Eldercrow, ihave incorporated your suggestions for sub-pixel dense 
upsampling operation rather than deconvolution.
   In jupyter notebook, iam able to visualize the dimension of network 
graphically. It is working perfectly but when i given this symbol for training 
throws an exception below.
   Kindly suggest 
   **" src/operator/./crop-inl.h:139: Check failed: param_.offset[1] <= 
data_shape[3]-out_shape[3] (8 vs. 0) offset[1] should be less than the residual 
space of width"**
 

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] chowkamlee81 opened a new issue #7717: Subpixel convolution(state of art) implementation rather than using Deconvolution.

2017-09-15 Thread git
chowkamlee81 opened a new issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: https://github.com/apache/incubator-mxnet/issues/7717
 
 
   Is there is any mxnet implementation of subpixel CNN rather than using 
Deconvolution which is the state of art according to  Real-Time Single Image 
and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural 
Network.
   
   
   There could be any developement from amazon mxnet framework?
 

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] chowkamlee81 commented on issue #1363: Error in FCN

2017-09-15 Thread git
chowkamlee81 commented on issue #1363: Error in FCN
URL: 
https://github.com/apache/incubator-mxnet/issues/1363#issuecomment-329698953
 
 
   Yeah i too met with the smae problem... Kindly let me know how u solved 
it..pls
 

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 Symbol Index (#7902)

2017-09-15 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 c560902  Fix Symbol Index (#7902)
c560902 is described below

commit c5609020e61c2917f09c762a2cf8dcd26076a4df
Author: Yao Wang 
AuthorDate: Thu Sep 14 23:57:06 2017 -0700

Fix Symbol Index (#7902)
---
 docs/api/python/index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/api/python/index.md b/docs/api/python/index.md
index 63b0c29..75aed07 100644
--- a/docs/api/python/index.md
+++ b/docs/api/python/index.md
@@ -38,7 +38,7 @@ imported by running:
 .. toctree::
:maxdepth: 1
 
-   symbol/ndarray.md
+   symbol/symbol.md
symbol/random.md
symbol/linalg.md
symbol/sparse.md

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