[GitHub] TimonLiu closed issue #7841: This code may cause some error

2017-09-11 Thread git
TimonLiu closed issue #7841: This code may cause some error
URL: https://github.com/apache/incubator-mxnet/issues/7841
 
 
   
 

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] ChuckTan123 commented on issue #6087: mx.sym.constant

2017-09-11 Thread git
ChuckTan123 commented on issue #6087: mx.sym.constant
URL: 
https://github.com/apache/incubator-mxnet/issues/6087#issuecomment-328742449
 
 
   I have been searching for this solution for hours. Finally got one working 
:) 
 

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] x10000year commented on issue #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
x1year commented on issue #7828: New tutorial of implementing operators in 
MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#issuecomment-328729659
 
 
   Could you please also explain the use of auxiliary states in the tutorial?  
(initialization, update, and state sharing if possible)
 

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] Godricly commented on issue #7845: rcnn fix_param_list prefix checking

2017-09-11 Thread git
Godricly commented on issue #7845: rcnn fix_param_list prefix checking
URL: 
https://github.com/apache/incubator-mxnet/issues/7845#issuecomment-328717851
 
 
   It's already a parameter for MutableModule. But the matching logic is wield 
here. 
   If I add 'gamma' or 'beta' in the fixed_param_names. it will fix all gamma 
and beta, even the one I defined. Maybe this is not expected before.
 

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 commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
reminisce commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138240596
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] reminisce commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
reminisce commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138240464
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] reminisce commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
reminisce commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138240082
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] reminisce commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
reminisce commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138240028
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] precedenceguo commented on issue #7845: rcnn fix_param_list prefix checking

2017-09-11 Thread git
precedenceguo commented on issue #7845: rcnn fix_param_list prefix checking
URL: 
https://github.com/apache/incubator-mxnet/issues/7845#issuecomment-328711895
 
 
   Yes, indeed. It is probably better to require fixed_param_names as a 
parameter for MutableModule instead, while moving this logic outside and log 
the fixed params.
   
   or adding a comment explaining the inconsistency?
 

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] precedenceguo commented on issue #7845: rcnn fix_param_list prefix checking

2017-09-11 Thread git
precedenceguo commented on issue #7845: rcnn fix_param_list prefix checking
URL: 
https://github.com/apache/incubator-mxnet/issues/7845#issuecomment-328711895
 
 
   Yes, indeed. It is probably better to require fixed_param_names as a 
parameter for MutableModule instead, while moving this logic outside and log 
the fixed params.
 

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] DomLi commented on issue #7823: is:pr is:open can anyone give clue how to install latest prebuilt package , where is setupenv.cmd? thanks

2017-09-11 Thread git
DomLi commented on issue #7823: is:pr is:open can anyone give clue how to 
install latest prebuilt package , where is setupenv.cmd? thanks
URL: 
https://github.com/apache/incubator-mxnet/issues/7823#issuecomment-328702576
 
 
   thx to all response, will try it.
 

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] rahul003 commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
rahul003 commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138210560
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] rahul003 commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
rahul003 commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138208451
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] rahul003 commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
rahul003 commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138229267
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] rahul003 commented on a change in pull request #7828: New tutorial of implementing operators in MXNet backend

2017-09-11 Thread git
rahul003 commented on a change in pull request #7828: New tutorial of 
implementing operators in MXNet backend
URL: https://github.com/apache/incubator-mxnet/pull/7828#discussion_r138228931
 
 

 ##
 File path: docs/how_to/add_op_in_backend.md
 ##
 @@ -0,0 +1,554 @@
+# A Beginner's Guide to Implementing Operators in MXNet Backend
+
+## Introduction
+Operators are essential elements for constructing neural networks. They define 
mathematical formulas
+of transforming input data (tensors) to outputs. MXNet has a rich set of 
operators from simple ones,
+such as element-wise sum, to complicated ones, such as convolution, that is
+capable of constructing most of the popular neural networks. You may have 
noticed
+that many operators implemented in MXNet have their equivalent forms in Numpy, 
such as
+[repeat](https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html),
+[tile](https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html),
+etc., and wonder why we could not simply use those Numpy operators in MXNet. 
One of the
+major reasons is that we need to support both CPU and GPU computing for the 
operators in MXNet,
+while Numpy operators do not possess GPU computing capability.
+In addition, we have performed plenty of
+optimizations for various components in MXNet, such as tensor data structure 
(`NDArray`),
+execution engine, computational graph and so on, for maximizing memory and 
runtime efficiency.
+An operator implemented under the MXNet operator framework would greatly
+leverage those optimizations for exhaustive performance enhancement.
+
+In this tutorial, we are going to practice implementing an operator using
+C++ in the MXNet backend. After finishing the implementation,
+we will add unit tests using Python for the operator we just implemented.
+
+## Implementation
+### An Operator Example
+Let's take the [quadratic 
function](https://en.wikipedia.org/wiki/Quadratic_function)
+as an example: `f(x) = ax^2+bx+c`. We want to implement an operator called 
`quadratic`
+taking `x`, which is a tensor, as an input and generating an output tensor `y`
+satisfying `y.shape=x.shape` and each element of `y` is calculated by feeding 
the
+corresponding element of `x` into the quadratic function `f`.
+Here variables `a`, `b`, and `c` are user input parameters.
+In frontend, the operator works like this:
+```python
+x = [[1, 2], [3, 4]]
+y = quadratic(data=x, a=1, b=2, c=3)
+y = [[6, 11], [18, 27]]
+```
+To implement this, we first create three files: `quadratic_op-inl.h`,
+`quadratic_op.cc`, and `quadratic_op.cu`. Then we are going to
+1. Define the parameter struct
+for registering `a`, `b`, and `c` in `quadratic_op-inl.h`.
+2. Define type and shape inference functions in `quadratic_op-inl.h`.
+3. Define forward and backward functions in `quadratic_op-inl.h`.
+4. Register the operator using [nnvm](https://github.com/dmlc/nnvm)
+in `quadratic_op.cc` and `quadratic_op.cu` for
+CPU and GPU computing, respectively.
+
+Now let's walk through the process step by step.
+
+### Parameter Registration
+We first define `struct QuadraticParam` as a placeholder for the
+parameters `a`, `b`, and `c` in `quadratic_op-inl.h`.
+The struct inherits from a base template
+struct named `dmlc::Parameter`, where the template argument is the derived 
struct
+`QuadraticParam`. This technique, which is called [curiously recurring template
+pattern](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern),
+achieves static polymorphism. It is similar to using a virtual function,
+but without the cost associated with dynamic polymorphism.
+
+```cpp
+struct QuadraticParam : public dmlc::Parameter {
+  float a, b, c;
+  DMLC_DECLARE_PARAMETER(QuadraticParam) {
+DMLC_DECLARE_FIELD(a)
+  .set_default(0.0)
+  .describe("Coefficient of the quadratic term in the quadratic 
function.");
+DMLC_DECLARE_FIELD(b)
+  .set_default(0.0)
+  .describe("Coefficient of the linear term in the quadratic function.");
+DMLC_DECLARE_FIELD(c)
+  .set_default(0.0)
+  .describe("Constant term in the quadratic function.");
+  }
+};
+```
+
+The function calls in the above parameter struct are self-explanatory by their 
names.
+Note that for each parameter, we set the default value to `0.0` such that 
users can
+skip passing 0-value parameters through the quadratic operator interface. You
+can choose not to define the default value for a parameter if it is required
+at runtime. Meanwhile, adding brief descriptions to the parameters enables
+the documentation engine to display them on
+[MXNet documentation web 
page](https://mxnet.incubator.apache.org/api/python/index.html).
+
+### Attribute Inference
+Attribute inference is the process of deducing the properties of `NDArray`s
+in neural networks from user provided information. Two most common attributes
+of an `NDArray` are data shape and data type.
+Let's take a look at the following example.
+Given an input `NDArray` called 

[GitHub] gautamkmr commented on issue #7826: Enable the test_CSVIter which fails intermittently on windows

2017-09-11 Thread git
gautamkmr commented on issue #7826: Enable the test_CSVIter which fails 
intermittently on windows
URL: 
https://github.com/apache/incubator-mxnet/issues/7826#issuecomment-328694708
 
 
   Step to reproduce the issue. just run this test on g2.2x or g2.8x ec2 
windows instance. 
 

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] Ldpe2G commented on issue #7855: Fix missing of CUDA device on non-GPU host

2017-09-11 Thread git
Ldpe2G commented on issue #7855: Fix missing of CUDA device on non-GPU host
URL: https://github.com/apache/incubator-mxnet/pull/7855#issuecomment-328691333
 
 
   @mg0880gm thanks for the pr.
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138215155
 
 

 ##
 File path: src/operator/mxnet_op.h
 ##
 @@ -221,12 +236,23 @@ template
 struct Kernel {
   template
   inline static void Launch(mshadow::Stream *s, int N, Args... args) {
-#if (MXNET_USE_CUDA == 0)
+#if MXNET_USE_CUDA == 0
 
 Review comment:
   Probably not
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
piiswrong commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138215004
 
 

 ##
 File path: src/operator/mxnet_op.h
 ##
 @@ -221,12 +236,23 @@ template
 struct Kernel {
   template
   inline static void Launch(mshadow::Stream *s, int N, Args... args) {
-#if (MXNET_USE_CUDA == 0)
+#if MXNET_USE_CUDA == 0
 
 Review comment:
   we don't even need this right?
 

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 issue #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on issue #7854: Basic CPU Kernel OMP selection based upon 
whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#issuecomment-328683212
 
 
   The complex logic to determine how many would be needed is coming in a 
separate PR
 

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 issue #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on issue #7854: Basic CPU Kernel OMP selection based upon 
whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#issuecomment-328681213
 
 
   I am trying to make this PR small.  This one is simply to give same behavior 
for GPU and CPU builds.  Other, more complext OMP stuff is coming in a separate 
PR.
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138213832
 
 

 ##
 File path: src/engine/threaded_engine.h
 ##
 @@ -311,6 +312,12 @@ class ThreadedEngine : public Engine {
*/
   void ExecuteOprBlock(RunContext run_ctx, OprBlock *opr_block) {
 ThreadedOpr* threaded_opr = opr_block->opr;
+#if MXNET_USE_CUDA
+if(run_ctx.ctx.dev_mask() == gpu::kDevMask) {
+  // Signify to kernel that GPU is being used
+  mxnet::op::mxnet_op::KernelState::SetUsingGPU(true);
 
 Review comment:
   The queue doesn't know that it's executing GPU, right?  Are you suggesting 
to set the queue to know that it should call this function? That seems kind of 
messy, right?
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138213531
 
 

 ##
 File path: src/engine/threaded_engine.h
 ##
 @@ -311,6 +312,12 @@ class ThreadedEngine : public Engine {
*/
   void ExecuteOprBlock(RunContext run_ctx, OprBlock *opr_block) {
 ThreadedOpr* threaded_opr = opr_block->opr;
+#if MXNET_USE_CUDA
+if(run_ctx.ctx.dev_mask() == gpu::kDevMask) {
+  // Signify to kernel that GPU is being used
+  mxnet::op::mxnet_op::KernelState::SetUsingGPU(true);
 
 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] cjolivier01 commented on issue #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 commented on issue #7854: Basic CPU Kernel OMP selection based upon 
whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#issuecomment-328681213
 
 
   I am trying to make this PR small.  This one is simply to give same behavior 
for GPU and CPU builds.  Other, more complext OMP stuff is coming in a separate 
PR.
 

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] mg0880gm commented on issue #7136: Module.bind() Error When Calling Scala API from Java

2017-09-11 Thread git
mg0880gm commented on issue #7136: Module.bind() Error When Calling Scala API 
from Java
URL: 
https://github.com/apache/incubator-mxnet/issues/7136#issuecomment-328680792
 
 
   @Ldpe2G Similar issue as @nm25tunn mentioned when run MxNet on a host 
without GPU. I submitted a pull request about proposal to fix this and the 
link: https://github.com/apache/incubator-mxnet/pull/7855. Could you help 
review in some convenient time?
   
   Basically the proposal is to call cudaSetDevice only when the input Context 
is not CPU. In local evaluation this help fix the issue successfully in a 
CPU-only host.
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
piiswrong commented on issue #7854: Basic CPU Kernel OMP selection based upon 
whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#issuecomment-328679962
 
 
   This needs to be combined with launching more cpu workers when using GPU to 
be useful.
   There should be a thread_local variable for how many threads to use, not a 
true/false use_gpu flag
 

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] mg0880gm opened a new pull request #7855: Fix missing of CUDA device on non-GPU host

2017-09-11 Thread git
mg0880gm opened a new pull request #7855: Fix missing of CUDA device on non-GPU 
host
URL: https://github.com/apache/incubator-mxnet/pull/7855
 
 
   The issue that "no CUDA-capable device is detected" occurs when calling 
MxNet from Java/Scala on a host without GPU. 
   
   The user scenario is to run MxNet model on CPU-only host with Context input 
as cpu(0). The default GPU unit shares the same index of zero with the default 
CPU unit. By default the MXNET_USE_CUDA is enabled and the logic will proceed 
to the line of "CUDA_CALL". The calling of cudaSetDevice exits with exception 
since there is GPU found for index of zero. The proposal here is to enable the 
"CUDA_CALL" only when the device type of Context is not CPU.
   
   The whole project with code changes proposed here has been built 
successfully in local host. After that the running of MxNet model was 
successful in CPU-only host for evaluation.
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
piiswrong commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138211690
 
 

 ##
 File path: src/engine/threaded_engine.h
 ##
 @@ -311,6 +312,12 @@ class ThreadedEngine : public Engine {
*/
   void ExecuteOprBlock(RunContext run_ctx, OprBlock *opr_block) {
 ThreadedOpr* threaded_opr = opr_block->opr;
+#if MXNET_USE_CUDA
+if(run_ctx.ctx.dev_mask() == gpu::kDevMask) {
+  // Signify to kernel that GPU is being used
+  mxnet::op::mxnet_op::KernelState::SetUsingGPU(true);
 
 Review comment:
   this should be done in gpu's lazy alloc queue
 

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] gautamkmr commented on issue #7826: Enable the test_CSVIter which fails intermittently on windows

2017-09-11 Thread git
gautamkmr commented on issue #7826: Enable the test_CSVIter which fails 
intermittently on windows
URL: 
https://github.com/apache/incubator-mxnet/issues/7826#issuecomment-328679700
 
 
   Running the test on windwos environment fails with following 
   - System 
   
 - Provider 
   
  [ Name]  Application Error 

 - EventID 1000 
   
  [ Qualifiers]  0 

  Level 2 

  Task 100 

  Keywords 0x80 

 - TimeCreated 
   
  [ SystemTime]  2017-09-11T22:20:04.170823700Z 

  EventRecordID 4672 

  Channel Application 

  Computer EC2AMAZ-SQL8POR 

  Security 

   
   - EventData 
   
  python.exe 
  3.6.1150.1013 
  58d320d0 
  libmxnet.dll 
  0.0.0.0 
  59b6bc76 
  c005 
  00dd7f28 
  5d8 
  01d32b4c1b20cf09 
  C:\Anaconda3\envs\py3\python.exe 
  
c:\Users\jenkins\Downloads\workspace\ut-python-cpu\pkg_vc14_cpu\build\libmxnet.dll
 
  04ddb8ec-73c8-4452-ab18-cf25f7ce2ddc 
   
   
   
   
   - EventData 
   
  python.exe 
  3.6.1150.1013 
  58d320d0 
  libmxnet.dll 
  0.0.0.0 
  59b6bc76 
  c005 
  00dd7f28 
  5d8 
  01d32b4c1b20cf09 
  C:\Anaconda3\envs\py3\python.exe 
  
c:\Users\jenkins\Downloads\workspace\ut-python-cpu\pkg_vc14_cpu\build\libmxnet.dll
 
  04ddb8ec-73c8-4452-ab18-cf25f7ce2ddc 
   
   
   
  3.6.1150.1013 
  58d320d0 
  libmxnet.dll 
  0.0.0.0 
  59b6bc76 
  c005 
  00dd7f28 
  5d8 
  01d32b4c1b20cf09 
  C:\Anaconda3\envs\py3\python.exe 
  
c:\Users\jenkins\Downloads\workspace\ut-python-cpu\pkg_vc14_cpu\build\libmxnet.dll
 
  04ddb8ec-73c8-4452-ab18-cf25f7ce2ddc 
   
 

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 #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
piiswrong commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138211690
 
 

 ##
 File path: src/engine/threaded_engine.h
 ##
 @@ -311,6 +312,12 @@ class ThreadedEngine : public Engine {
*/
   void ExecuteOprBlock(RunContext run_ctx, OprBlock *opr_block) {
 ThreadedOpr* threaded_opr = opr_block->opr;
+#if MXNET_USE_CUDA
+if(run_ctx.ctx.dev_mask() == gpu::kDevMask) {
+  // Signify to kernel that GPU is being used
+  mxnet::op::mxnet_op::KernelState::SetUsingGPU(true);
 
 Review comment:
   this should be put in lazy alloc queue
 

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-11 Thread git
FrancisTse8 commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: 
https://github.com/apache/incubator-mxnet/issues/7852#issuecomment-328678537
 
 
   How do I manually add path to cblas in the makefile?
 

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 opened a new pull request #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

2017-09-11 Thread git
cjolivier01 opened a new pull request #7854: Basic CPU Kernel OMP selection 
based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854
 
 
   First iteration for performance enhancements
   If GPU isn't used, then use OMP for running CPU kernels
   GPU usage is triggerred by ThreadedEngine or NaiveEngine
 

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 #7829: Disabling the test_CSVIter for now

2017-09-11 Thread git
piiswrong closed pull request #7829: Disabling the test_CSVIter for now
URL: https://github.com/apache/incubator-mxnet/pull/7829
 
 
   
 

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] gautamkmr commented on a change in pull request #7829: Disabling the test_CSVIter for now

2017-09-11 Thread git
gautamkmr commented on a change in pull request #7829: Disabling the 
test_CSVIter for now
URL: https://github.com/apache/incubator-mxnet/pull/7829#discussion_r138204223
 
 

 ##
 File path: tests/python/unittest/test_io.py
 ##
 @@ -255,7 +257,7 @@ def check_libSVMIter_news_data():
 
 check_libSVMIter_synthetic()
 check_libSVMIter_news_data()
-
+@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/7626;)
 
 Review comment:
   Took care of the 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] arank commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3

2017-09-11 Thread git
arank commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: 
https://github.com/apache/incubator-mxnet/issues/7852#issuecomment-328671102
 
 
   It looks like the linker isn't finding cblas you may need to manually add 
the path to the makefile. Also it looks like someone may have pushed a breaking 
change for our ARM/Rpi build to our makefile @szha ...
   
 

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

2017-09-11 Thread git
szha commented on issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: 
https://github.com/apache/incubator-mxnet/issues/7852#issuecomment-328669167
 
 
   @arank 
 

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 commented on issue #7813: Performance doesn't improve (scalability issue) with # GPUs with running train_imagenet.py

2017-09-11 Thread git
ptrendx commented on issue #7813: Performance doesn't improve (scalability 
issue) with # GPUs with running train_imagenet.py
URL: 
https://github.com/apache/incubator-mxnet/issues/7813#issuecomment-328649594
 
 
   As I said, alexnet is a very small network, so with 8 physical cores you 
probably will not get a much better scaling result with those GPUs. Try a 
bigger network (vgg, resnet 50 or something similar) where there is not as big 
stress on IO and you should get a very good scaling result.
   
   Still, IO speed is a big problem going forward even for larger networks and 
that is why we are working on ways to improve it (besides my PR see for example 
#7092)
 

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 opened a new issue #7852: Trouble installing MXNet on Raspberry Pi 3

2017-09-11 Thread git
FrancisTse8 opened a new issue #7852: Trouble installing MXNet on Raspberry Pi 3
URL: https://github.com/apache/incubator-mxnet/issues/7852
 
 
   ## Environment info and background:
   Raspberry Pi 3 running Raspbian version 9 stretch
   
   On the newly installed Raspbian on a Raspberry Pi 3, followed instructions 
on 
https://aws.amazon.com/blogs/ai/build-a-real-time-object-classification-system-with-apache-mxnet-on-raspberry-pi/
 to first install the prerequisites:
   sudo apt-get update
   sudo apt-get install python-pip python-opencv python-scipy python-picamera
   
   After that, I followed the instructions to go to page 
https://mxnet.incubator.apache.org/get_started/install.html to install MXNet by 
selecting Devices and Raspberry Pi.
   
   I followed the instructions and did the following:
   sudo apt-get update
   sudo apt-get -y install git cmake build-essential g++-4.8 c++-4.8 
liblapack* libblas* libopencv*
   git clone https://github.com/dmlc/mxnet.git --recursive
   cd mxnet
   make
   
   Build stopped and got an error message.
   
   ## Error Message:
   ...
   /usr/bin/ld: cannot find -lcblas
   collect2: error: ld returned 1 exit status
   Makefile:322: recipe for target 'lib/libmxnet.so' failed
   make: *** [lib/libmxnet.so] Error 1
   
   ## What have you tried to solve it?
   
   Thought the problem was just missing a library, so did the following:
   pi@raspberrypi:~ $ sudo apt-get install libcblas*
   
   Ran make again and got further (now have libmxnet.so generated). However, 
got another error.
   
   ## New Error Message:
   
   /usr/bin/ld: build/src/operator/tensor/la_op.o: undefined reference to 
symbol 'cblas_dtrsm'
   //usr/lib/libblas.so.3: error adding symbols: DSO missing from command line
   collect2: error: ld returned 1 exit status
   Makefile:344: recipe for target 'bin/im2rec' failed
   make: *** [bin/im2rec] Error 1
   
   ## Steps to reproduce
   Will get the same error each time I run make again.
   
   ## Need Help
   
   Now, I do not know what to do. Has anyone else come across the same problem. 
Any suggestions for a solution?
   
 

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] rohith14 commented on issue #7813: Performance doesn't improve (scalability issue) with # GPUs with running train_imagenet.py

2017-09-11 Thread git
rohith14 commented on issue #7813: Performance doesn't improve (scalability 
issue) with # GPUs with running train_imagenet.py
URL: 
https://github.com/apache/incubator-mxnet/issues/7813#issuecomment-328643238
 
 
   Thank you, ptrendx.  That helps, but with 4 GPUs there isn't any performance 
gain
   
   
   % i limited the augmentations by setting 'data.set_data_aug_level(parser, 0)'
   %set data_threads to 8 (I have 8 physical cores)
   python train_imagenet.py --data-train 
/local/ImageNet/MXNet_data/MXNet_data.rec --data-val 
/local/ImageNet/MXNet_data/MXNet_data_test.rec --gpus 0,1,2,3 --network alexnet 
--data-nthreads 8 --batch-size 1024 --num-epochs 1 --kv-store device
   
   With 1 GPU, Time-cost : 680 sec
   With 2 GPU, Time-cost : 373 sec
   With 4 GPU, Time-cost : 378 sec
   
   So, 
 

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] rohith14 commented on issue #7813: Performance doesn't improve (scalability issue) with # GPUs with running train_imagenet.py

2017-09-11 Thread git
rohith14 commented on issue #7813: Performance doesn't improve (scalability 
issue) with # GPUs with running train_imagenet.py
URL: 
https://github.com/apache/incubator-mxnet/issues/7813#issuecomment-328643238
 
 
   Thank you, ptrendx.  That helps, but with 4 GPUs there isn't any performance 
gain
   
   
   % i limited the augmentations by setting 'data.set_data_aug_level(parser, 0)'
   %set data_threads to 8 (I have 8 physical cores)
   python train_imagenet.py --data-train 
/local/ImageNet/MXNet_data/MXNet_data.rec --data-val 
/local/ImageNet/MXNet_data/MXNet_data_test.rec --gpus 0,1,2,3 --network alexnet 
--data-nthreads 8 --batch-size 1024 --num-epochs 1 --kv-store device
   
   With 1 GPU, Time-cost : 680 sec
   With 2 GPU, Time-cost : 373 sec
   With 4 GPU, Time-cost : 378 sec
   
   
 

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] starimpact commented on issue #7837: threaded_engine error when running distributed training program

2017-09-11 Thread git
starimpact commented on issue #7837: threaded_engine error when running 
distributed training program
URL: 
https://github.com/apache/incubator-mxnet/issues/7837#issuecomment-328631804
 
 
   yes, the cudnn should be supported in that machine, because the error 
happened after a few hours of training start.
 

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] jli05 commented on issue #7781: Implement Khatri-Rao operator

2017-09-11 Thread git
jli05 commented on issue #7781: Implement Khatri-Rao operator
URL: https://github.com/apache/incubator-mxnet/pull/7781#issuecomment-328630854
 
 
   I'm for exposing only column-wise Khatri-Rao for the Python Op, but only 
reserving the row-wise one for framework developers (C++).
 

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 #7851: Need for consistent naming of argument names.

2017-09-11 Thread git
rravu3 opened a new issue #7851: Need for consistent naming of argument names.
URL: https://github.com/apache/incubator-mxnet/issues/7851
 
 
   Can we have a consistent naming of argument names in ndarray operations and 
Modules.
   
   Here are some examples:-
   1) In gluon, different layers have different argument names for input and 
output dimensions.
   Embedding Block uses -> input_dim and output_dim.
   Dense Block uses -> in_units and units.
   LSTM Block uses -> hidden_size and input_size.
   
   2) nd.concat uses dim as the name of the axis argument where as other 
functions like argmax use axis.
   
   It's desirable to enforce consistency in naming arguments so that I don't 
have to look it up everytime.
  
 

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 #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
szha commented on issue #7577: Sparse operators for unary and binary elemwise 
NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#issuecomment-328622903
 
 
   That's the code owner feature in effect.
 

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] rahul003 closed pull request #7421: Resolve more compile warnings

2017-09-11 Thread git
rahul003 closed pull request #7421: Resolve more compile warnings
URL: https://github.com/apache/incubator-mxnet/pull/7421
 
 
   
 

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-09-11 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-328617706
 
 
   *@eric-haibin-lin *fixed version and pushed
   
   yes needs to copy it. but that's just taking the topK entries and returning
   it as a set. it seems too low - level to be a standalone function ?
   
   On Mon, Sep 11, 2017 at 11:23 AM, Haibin Lin 
   wrote:
   
   > *@eric-haibin-lin* commented on this pull request.
   >
   > The PR diff shows you updated a different version of dmlc-core. Could you
   > make sure your branch have the
   > dmlc-core @ 5b52029 (the same version on mxnet master)?
   > --
   >
   > In python/mxnet/metric.py
   > 
   > :
   >
   > > +Returns:
   > +
   > +The recall at K (float)
   > +"""
   > +check_label_shapes(labels, preds)
   > +
   > +for label, pred_label in zip(labels, preds):
   > +assert(len(pred_label.shape) <= 2), 'Predictions should be no 
more than 2 dims'
   > +pred_label = 
numpy.argsort(-pred_label.asnumpy().astype('float32'), axis=1)
   > +label = label.asnumpy().astype('int32')
   > +check_label_shapes(label, pred_label)
   > +num_samples = pred_label.shape[0]
   > +local_recall = 0.0
   > +for s in range(num_samples):
   > +truepos = true_positives(label[s,:])
   > +predpos = set(numpy.ravel(pred_label[s, :self.top_k]))
   >
   > If another person wants to add top_k_F1, he can reuse the true_positive
   > function. Does he have to copy this line set(numpy.ravel(pred_label[s,
   > :self.top_k])) again?
   >
   > ?
   > You are receiving this because you were mentioned.
   > 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


[incubator-mxnet] branch master updated: only print if there are warnings (#7850)

2017-09-11 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 9d24cfd  only print if there are warnings (#7850)
9d24cfd is described below

commit 9d24cfd71f14d719a67c903204d866f15e6848fc
Author: Rahul Huilgol 
AuthorDate: Mon Sep 11 11:17:01 2017 -0700

only print if there are warnings (#7850)
---
 tests/nightly/compilation_warnings/process_output.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/nightly/compilation_warnings/process_output.py 
b/tests/nightly/compilation_warnings/process_output.py
index 5f85af5..d7ed329 100644
--- a/tests/nightly/compilation_warnings/process_output.py
+++ b/tests/nightly/compilation_warnings/process_output.py
@@ -46,9 +46,10 @@ def print_summary(time, warnings):
 print 'START - Compilation warnings summary'
 print 'Time taken to compile:', time, 's'
 print 'Total number of warnings:', total_count, '\n'
-print 'Below is the list of unique warnings and the number of occurrences 
of that warning'
-for warning, count in sorted_warnings:
-print count, ': ', warning
+if total_count>0:
+print 'Below is the list of unique warnings and the number of 
occurrences of that warning'
+for warning, count in sorted_warnings:
+print count, ': ', warning
 print 'END - Compilation warnings summary'
 
 c_output = open(sys.argv[1],'r')

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


[GitHub] piiswrong closed pull request #7850: Nightly test, Compilation warnings: only print if there are warnings

2017-09-11 Thread git
piiswrong closed pull request #7850: Nightly test, Compilation warnings: only 
print if there are warnings
URL: https://github.com/apache/incubator-mxnet/pull/7850
 
 
   
 

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] rahul003 commented on a change in pull request #7829: Disabling the test_CSVIter for now

2017-09-11 Thread git
rahul003 commented on a change in pull request #7829: Disabling the 
test_CSVIter for now
URL: https://github.com/apache/incubator-mxnet/pull/7829#discussion_r138148967
 
 

 ##
 File path: tests/python/unittest/test_io.py
 ##
 @@ -255,7 +257,7 @@ def check_libSVMIter_news_data():
 
 check_libSVMIter_synthetic()
 check_libSVMIter_news_data()
-
+@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/7626;)
 
 Review comment:
   nit here: please add a new line this line
 

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] rahul003 commented on a change in pull request #7829: Disabling the test_CSVIter for now

2017-09-11 Thread git
rahul003 commented on a change in pull request #7829: Disabling the 
test_CSVIter for now
URL: https://github.com/apache/incubator-mxnet/pull/7829#discussion_r138148875
 
 

 ##
 File path: tests/python/unittest/test_io.py
 ##
 @@ -255,7 +257,7 @@ def check_libSVMIter_news_data():
 
 check_libSVMIter_synthetic()
 check_libSVMIter_news_data()
-
+@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/7626;)
 
 Review comment:
   I would say that is more than a nit :) 
 

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 issue #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on issue #7577: Sparse operators for unary and binary 
elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#issuecomment-328611077
 
 
   @mli not sure why it says I requested review.  I must have done that by 
mistake.
 

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 #7390: adding ranking metrics (precision/recall) at position K.

2017-09-11 Thread git
eric-haibin-lin commented on a change in pull request #7390: adding ranking 
metrics (precision/recall) at position K. 
URL: https://github.com/apache/incubator-mxnet/pull/7390#discussion_r138146891
 
 

 ##
 File path: python/mxnet/metric.py
 ##
 @@ -569,6 +569,161 @@ def update(self, labels, preds):
 self.num_inst += 1
 
 
+def true_positives(label):
+"""given a vector of labels, returns the set of indices 
+corresponding to positives
+Parameters:
+--
+label   : vector of binary ground truth
+Returns:
+
+set of indices corresponding to positive examples
+"""
+return set(numpy.ravel(numpy.argwhere(label == 1)))
+
+
+@register
+@alias('top_k_precision')
+class TopKPrecision(EvalMetric):
+"""Computes top k precision metric.
+top k differs from regular precision in that the score is only
+computed for the top k predictions. "correct" or "wrong" entries
+outside the top k are ignored
+Parameters
+--
+top_k : int
+Whether targets are in top k predictions.
+name : str
+Name of this metric instance for display.
+output_names : list of str, or None
+Name of predictions that should be used when updating with update_dict.
+By default include all predictions.
+label_names : list of str, or None
+Name of labels that should be used when updating with update_dict.
+By default include all labels.
+
+Examples
+
+>>>ytrue = [[1.,0.,1.,0.],[0.,1.,1.,0.]]
+>>>ytrue = mx.nd.array(ytrue)
+>>>yhat = [[0.4,0.8,0.1,0.1],[0.4,0.8,0.8,0.4]]
+>>>yhat = mx.nd.array(yhat)
+>>>pre = mx.metric.create('top_k_precision',top_k=2)
+>>>pre.update(preds = [yhat], labels = [ytrue])
+>>>print pre.get()[1]
+>>> 0.75
+
+"""
+
+def __init__(self, top_k=1, name='top_k_precision',
+ output_names=None, label_names=None):
+super(TopKPrecision, self).__init__(
+name, top_k=top_k,
+output_names=output_names, label_names=label_names)
+self.top_k = top_k
+
+
+def update(self, labels, preds):
+"""Updates the internal evaluation result.
+Parameters
+--
+labels : list of `NDArray`
+The labels of the data. (binary)
+preds : list of `NDArray`
+Predicted values. (float)
+
+Returns:
+
+The precision at K (float)
+"""
+check_label_shapes(labels, preds)
+
+for label, pred_label in zip(labels, preds):
+assert(len(pred_label.shape) <= 2), 'Predictions should be no more 
than 2 dims'
+pred_label = 
numpy.argsort(-pred_label.asnumpy().astype('float32'), axis=1)
+label = label.asnumpy().astype('int32')
+check_label_shapes(label, pred_label)
+num_samples = pred_label.shape[0]
+local_precision = 0.0
+for s in range(num_samples):
+truepos = true_positives(label[s,:])
+predpos = set(numpy.ravel(pred_label[s, :self.top_k]))
+local_precision += 
len(truepos.intersection(predpos))/self.top_k
+self.sum_metric += local_precision
+self.num_inst += num_samples
+
+
+@register
+@alias('top_k_recall')
+class TopKRecall(EvalMetric):
+"""Computes top k recall metric.
+top k differs from regular recall in that the score is only
+computed for the top k predictions. "correct" or "wrong" entries
+outside the top k are ignored
+Parameters
+--
+top_k : int
+Whether targets are in top k predictions.
+name : str
+Name of this metric instance for display.
+output_names : list of str, or None
+Name of predictions that should be used when updating with update_dict.
+By default include all predictions.
+label_names : list of str, or None
+Name of labels that should be used when updating with update_dict.
+By default include all labels.
+
+Examples
+
+>>>ytrue = [[1.,0.,1.,0.],[0.,1.,1.,0.]]
+>>>ytrue = mx.nd.array(ytrue)
+>>>yhat = [[0.4,0.8,0.1,0.1],[0.4,0.8,0.8,0.4]]
+>>>yhat = mx.nd.array(yhat)
+>>>pre = mx.metric.create('top_k_precision',top_k=2)
+>>>rec.update(preds = [yhat], labels = [ytrue])
+>>>print rec.get()[1]
+>>> 0.75
+
+"""
+
+def __init__(self, top_k=1, name='top_k_recall',
+ output_names=None, label_names=None):
+super(TopKRecall, self).__init__(
+name, top_k=top_k,
+output_names=output_names, label_names=label_names)
+self.top_k = top_k
+
+def update(self, labels, preds):
+"""Updates the internal evaluation result.
+Parameters
+--
+labels : list of `NDArray`
+The labels of the data. (binary)
+preds : list of `NDArray`
+Predicted 

[GitHub] rahul003 opened a new pull request #7850: only print if there are warnings

2017-09-11 Thread git
rahul003 opened a new pull request #7850: only print if there are warnings
URL: https://github.com/apache/incubator-mxnet/pull/7850
 
 
   Only print list of warnings if there are warnings
 

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] juselec commented on issue #7846: Failure to install R GPU-version package

2017-09-11 Thread git
juselec commented on issue #7846: Failure to install R GPU-version package
URL: 
https://github.com/apache/incubator-mxnet/issues/7846#issuecomment-328609443
 
 
   Hello Miguel,
   
   Are you using RStudio? If yes, try to reinstall it in a pure R console. I 
have had some problems in the past with the Rstudio paths and solved them 
installing the packages in pure R console. Also I followed your steps in my 
computer with a R console and the library loaded well.
   
   Hope this helps.
 

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] x10000year opened a new issue #7849: Need documentation for use of auxiliary states in creating custom operators

2017-09-11 Thread git
x1year opened a new issue #7849: Need documentation for use of auxiliary 
states in creating custom operators
URL: https://github.com/apache/incubator-mxnet/issues/7849
 
 
   I don't find any tutorial or documentation for how to use auxiliary states 
in creating custom operators (in c++).
   
   Specifically, I want to know:
   1. How to initialize the states?
   2. How to update them (in single/multiple gpu training)? 
   3. How to share states between different layers?
   
   Thank you.
 

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] juselec opened a new issue #7848: __shfl_down is undefined. Is the end of CUDA 2.1 support?

2017-09-11 Thread git
juselec opened a new issue #7848: __shfl_down is undefined. Is the end of CUDA 
2.1 support?
URL: https://github.com/apache/incubator-mxnet/issues/7848
 
 
   Compiling mxnet either on Windows or linux throws the error **identifier 
__shfl_down is undefined** when compiling the stable 0.11.0 branch. If I 
compile the master branch (until commit e25074a4), **identifier __shfl_xor is 
undefined_ error** is also thrown. 
   
   I have read in issue #4886 that this error is thrown because the lack of 
support of fermi GPU's, with CUDA capability 2.1. Is this the end of the 
support? Or just a temporary issue?
   
   Thanks a lot.
   
   ## Environment info
   **Operating System:**
   
   Windows 10 x64.
   Archlinux (Kernel 4.12.12).
   
   Intel HD graphics 4000 + Nvidia GeForce 710m (Nvidia Optimus configuration).
   
   **Compiler:**
   
   CUDA 8.0.61
   Visual Studio 2015 (on Windows).
   G++ version 5 (on linux, as CUDA 8 is not compatible with gcc 6+).
   
   ## Error Message:
   
   Compiling master branch.
   > Error  identifier "__shfl_down" is undefined   mxnet   
c:\software\mxnet\src\operator\depthwise_convolution_tf.cuh 44  
   Erroridentifier "__shfl_xor" is undefinedmxnet   
c:\software\mxnet\src\operator\depthwise_convolution_tf.cuh 39
   
   Compiling 0.11.0 stable branch:
   >Error   identifier "__shfl_down" is undefined   mxnet   
c:\software\mxnet\src\operator\depthwise_convolution_tf.cuh 479 
   Erroridentifier "__shfl_down" is undefined   mxnet   
c:\software\mxnet\src\operator\depthwise_convolution_tf.cuh 507
   
   Similar error on Linux.
   
   ## Steps to reproduce
   1. Clone stable 0.11 branch or master branch.
   2. Compile with a fermi gpu, CUDA 2.1.
   
   ## What have you tried to solve it?
   1. Revert to previous commits, problem persists.
   
   ## config.mk file.
   These are the lines I modified in the config.mk file. They are right at the 
end of the file. Similar configuration in Windows with cmake.
   
   USE_CUDA=1
   USE_CUDA_PATH=/opt/cuda
   USE_CUDNN=0
   USE_BLAS=blas
   USE_OPENCV=0
   USE_OPENCV=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] piiswrong commented on issue #7847: Bug on Multi GPU : probably Invalid initialization of optimizer

2017-09-11 Thread git
piiswrong commented on issue #7847: Bug on Multi GPU : probably Invalid 
initialization of optimizer
URL: 
https://github.com/apache/incubator-mxnet/issues/7847#issuecomment-328596002
 
 
   @szha 
 

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 commented on issue #7733: How to convert the data of the result of mx.symbol.Convolution to nd.array data format?

2017-09-11 Thread git
reminisce commented on issue #7733: How to convert the data of the result of 
mx.symbol.Convolution to nd.array data format?
URL: 
https://github.com/apache/incubator-mxnet/issues/7733#issuecomment-328594505
 
 
   `mx.symbol.Convolution` indeed generates `nd.NDArray` data format. You just 
need to create an executor first through symbol binding and run executor's 
forward 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] piiswrong closed pull request #7727: change contrib CTC to zero-indexed, in log space. sequence mask for grad

2017-09-11 Thread git
piiswrong closed pull request #7727: change contrib CTC to zero-indexed, in log 
space. sequence mask for grad
URL: https://github.com/apache/incubator-mxnet/pull/7727
 
 
   
 

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: change contrib CTC to zero-indexed, in log space. sequence mask for grad (#7727)

2017-09-11 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 123deb0  change contrib CTC to zero-indexed, in log space. sequence 
mask for grad (#7727)
123deb0 is described below

commit 123deb0946051c72719c59337e1485351fbf0122
Author: Sheng Zha 
AuthorDate: Mon Sep 11 10:05:09 2017 -0700

change contrib CTC to zero-indexed, in log space. sequence mask for grad 
(#7727)

* change CTC to zero-indexed, in log space. sequence mask for grad

* CTC remove padding_mask, add reserve_first_label flag for blank=0/len-1

* update to blank_label enum

* remove optional

* update doc

* dummy test
---
 docs/api/python/gluon/gluon.md |  3 +
 python/mxnet/gluon/loss.py | 32 +
 src/operator/contrib/ctc_include/detail/cpu_ctc.h  | 72 +--
 src/operator/contrib/ctc_include/detail/gpu_ctc.h  | 70 +-
 .../contrib/ctc_include/detail/gpu_ctc_kernels.h   | 34 -
 src/operator/contrib/ctc_loss-inl.h| 67 +++--
 src/operator/contrib/ctc_loss.cc   | 53 +-
 src/operator/contrib/ctc_loss.cu   |  3 +-
 .../{sequence_mask.cu => nn/sequence_mask-inl.h}   | 64 +++--
 src/operator/sequence_mask-inl.h   |  6 +-
 src/operator/sequence_mask.cc  | 13 
 src/operator/sequence_mask.cu  | 50 +
 src/operator/sequence_op_common.h  |  8 +--
 tests/python/gpu/test_operator_gpu.py  |  6 +-
 tests/python/unittest/test_loss.py | 44 
 tests/python/unittest/test_operator.py | 83 ++
 16 files changed, 337 insertions(+), 271 deletions(-)

diff --git a/docs/api/python/gluon/gluon.md b/docs/api/python/gluon/gluon.md
index f4c3aa9..a639ad2 100644
--- a/docs/api/python/gluon/gluon.md
+++ b/docs/api/python/gluon/gluon.md
@@ -166,6 +166,7 @@ in Python and then deploy with symbolic graph in C++ and 
Scala.
 L1Loss
 SoftmaxCrossEntropyLoss
 KLDivLoss
+CTCLoss
 ```
 
 ## Utilities
@@ -483,6 +484,8 @@ Model zoo provides pre-defined and pre-trained models to 
help bootstrap machine
 :members:
 .. autoclass:: mxnet.gluon.loss.KLDivLoss
 :members:
+.. autoclass:: mxnet.gluon.loss.CTCLoss
+:members:
 .. automethod:: mxnet.gluon.utils.split_data
 
 .. automethod:: mxnet.gluon.utils.split_and_load
diff --git a/python/mxnet/gluon/loss.py b/python/mxnet/gluon/loss.py
index 326399c..c7a218b 100644
--- a/python/mxnet/gluon/loss.py
+++ b/python/mxnet/gluon/loss.py
@@ -312,9 +312,6 @@ class CTCLoss(Loss):
 Layout of the output sequence activation vector.
 label_layout : str, default 'NT'
 Layout of the labels.
-padding_mask : int or None, default -1
-This is the label value to be considered padding, which is used to 
derive the actual
-lengths of labels. Only required when `label_lengths` is None.
 weight : float or None
 Global scalar weight for loss.
 sample_weight : Symbol or None
@@ -325,21 +322,28 @@ class CTCLoss(Loss):
 This should be used as the fifth argument when calling this loss.
 
 Input shapes:
-`data` is an activation tensor without softmax.
+`data` is an activation tensor (i.e. before softmax).
 Its shape depends on `layout`. For `layout='TNC'`, this
 input has shape `(sequence_length, batch_size, alphabet_size)`
+Note that the last dimension with index `alphabet_size-1` is reserved 
for special
+blank character.
 
-`label` is the label index matrix.
+`label` is the label index matrix with zero-indexed labels.
 Its shape depends on `label_layout`. For `label_layout='TN'`, this
-input has shape `(label_sequence_length, batch_size)`
-When `label_lengths` is not specified, the first occurrence of 
`padding_mask`
+input has shape `(label_sequence_length, batch_size)`. Padding mask of 
value ``-1``
+is available for dealing with unaligned label lengths.
+When `label_lengths` is specified, label lengths are directly used and 
padding mask
+is not allowed in the label.
+When `label_lengths` is not specified, the first occurrence of ``-1``
 in each sample marks the end of the label sequence of that sample.
-For example, suppose there are two samples, with 
*label_sequence_length* = 4.
-The two sequences of labels are [2, 1] and [3, 2, 2], and their actual 
lengths
-are smaller than 4. Thus, given *padding_mask* = 0, the resulting 
```label```
+
+For example, suppose the vocabulary is `[a, b, c]`, and in one 

[GitHub] piiswrong closed pull request #7843: fix condition

2017-09-11 Thread git
piiswrong closed pull request #7843: fix condition
URL: https://github.com/apache/incubator-mxnet/pull/7843
 
 
   
 

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 condition (#7843)

2017-09-11 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 85e95bb  fix condition (#7843)
85e95bb is described below

commit 85e95bbe468c2bd1faf0736962325683a1c802c7
Author: Joshua Z. Zhang 
AuthorDate: Mon Sep 11 10:01:18 2017 -0700

fix condition (#7843)
---
 python/mxnet/image/detection.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/mxnet/image/detection.py b/python/mxnet/image/detection.py
index f67b05d..6ed9c3a 100644
--- a/python/mxnet/image/detection.py
+++ b/python/mxnet/image/detection.py
@@ -243,7 +243,7 @@ class DetRandomCropAug(DetAugmenter):
 if valid_objects.size < 1:
 return False
 intersects = self._intersect(label[valid_objects, 1:], x1, y1, x2, y2)
-coverages = self._calculate_areas(intersects) / object_areas
+coverages = self._calculate_areas(intersects) / 
object_areas[valid_objects]
 coverages = coverages[np.where(coverages > 0)[0]]
 if coverages.size > 0 and np.amin(coverages) > self.min_object_covered:
 return True

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


[GitHub] adstraw commented on issue #7810: Enable MKL support for full pooling

2017-09-11 Thread git
adstraw commented on issue #7810: Enable MKL support for full pooling
URL: https://github.com/apache/incubator-mxnet/pull/7810#issuecomment-328591929
 
 
   Young identified an issue with this commit.  I am working to debug.  Shall I 
close this pull request while debugging or leave it open?
 

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 #7837: threaded_engine error when running distributed training program

2017-09-11 Thread git
szha commented on issue #7837: threaded_engine error when running distributed 
training program
URL: 
https://github.com/apache/incubator-mxnet/issues/7837#issuecomment-328589811
 
 
   The call to cudnn on a worker failed. You need to check whether that worker 
can run cudnn-supported softmax on the single machine.
 

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] unrealwill commented on issue #7847: Bug on Multi GPU : probably Invalid initialization of optimizer

2017-09-11 Thread git
unrealwill commented on issue #7847: Bug on Multi GPU : probably Invalid 
initialization of optimizer
URL: 
https://github.com/apache/incubator-mxnet/issues/7847#issuecomment-328588763
 
 
   I found a workaround to my problem : 
   Adding after mod.load_params("testmultigpu.params")  : 
// We force a proper initialization of the optimizer after the reloading of 
the parameter
   mod.init_optimizer(optimizer='adam', optimizer_params=[('learning_rate', 
1e-3)], force_init=True)
   
   solves the issue (but the different behaviour between single and multi gpu 
is misleading). 
   
   
   
 

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] cswiercz commented on issue #7781: Implement Khatri-Rao operator

2017-09-11 Thread git
cswiercz commented on issue #7781: Implement Khatri-Rao operator
URL: https://github.com/apache/incubator-mxnet/pull/7781#issuecomment-328583995
 
 
   > I am not sure about the row_wise flag. The khatri-rao is a column-wise 
kronecker product, and the row-wise would also refer to the kronecker product, 
not khatri-rao.. Would it be clearer to have khatri_rao and maybe 
row_wise_kronecker (long name but unambiguous?)
   
   Yeah, I wasn't so sure about the flag. Having a separate operator sounds 
like a better idea. Plus it would clean up the code a bit. For consistency 
maybe:
   
   * `khatri_rao()`
   * `column_wise_kronecker()` *(alias to `khatri_rao`)*
   * `row_wise_kronecker()`
   
   Thoughts from anyone who is interested?
 

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] cswiercz commented on issue #7781: Implement Khatri-Rao operator

2017-09-11 Thread git
cswiercz commented on issue #7781: Implement Khatri-Rao operator
URL: https://github.com/apache/incubator-mxnet/pull/7781#issuecomment-328583995
 
 
   > I am not sure about the row_wise flag. The khatri-rao is a column-wise 
kronecker product, and the row-wise would also refer to the kronecker product, 
not khatri-rao.. Would it be clearer to have khatri_rao and maybe 
row_wise_kronecker (long name but unambiguous?)
   
   Yeah, I wasn't so sure about the flag. Having a separate operator sounds 
like a better idea. For consistency maybe:
   
   * `khatri_rao()`
   * `column_wise_kronecker()` *(alias to `khatri_rao`)*
   * `row_wise_kronecker()`
   
   Thoughts from anyone who is interested?
 

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 #7829: Disabling the test_CSVIter for now

2017-09-11 Thread git
eric-haibin-lin commented on a change in pull request #7829: Disabling the 
test_CSVIter for now
URL: https://github.com/apache/incubator-mxnet/pull/7829#discussion_r138120210
 
 

 ##
 File path: tests/python/unittest/test_io.py
 ##
 @@ -255,7 +257,7 @@ def check_libSVMIter_news_data():
 
 check_libSVMIter_synthetic()
 check_libSVMIter_news_data()
-
+@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/7626;)
 
 Review comment:
   nit: Could you put the right link to the issue? 
 

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] unrealwill opened a new issue #7847: Bug on Multi GPU : probably Invalid initialization of optimizer

2017-09-11 Thread git
unrealwill opened a new issue #7847: Bug on Multi GPU : probably Invalid 
initialization of optimizer
URL: https://github.com/apache/incubator-mxnet/issues/7847
 
 
   ## Environment info
   Operating System:
   Ubuntu 16.04
   MXNet version:
   0.11.0
   
   The first "update" when on multi-gpu does something strange. It then works 
fine but currently it breaks the save points.
   
   I have manage to reproduce with simple code.
   
   ```
   import mxnet as mx
   from mxnet.io import DataBatch,DataDesc
   import numpy as np
   
   
   def buildModel():
   data = mx.symbol.Variable('data')
   text = mx.symbol.Variable('label')
   dense = mx.symbol.FullyConnected( data ,name="fc1", num_hidden=3 )
   out = mx.symbol.SoftmaxOutput( dense,text,name="softmaxoutput")
   
   
   #SINGLE GPU WORKS
   #mod = mx.mod.Module(out, context=[mx.gpu(0)], data_names=["data"], 
label_names=["label"])
   #Multi GPU DOESN'T WORK
   mod = mx.mod.Module(out, context=[mx.gpu(0),mx.gpu(1)], 
data_names=["data"], label_names=["label"])
   return mod
   
   def initModel(m,bs):
   m.bind(data_shapes=[DataDesc("data", (bs, 100))],
  label_shapes=[DataDesc("label", (bs,))], force_rebind=True)
   m.init_params()
   m.init_optimizer(optimizer='adam', optimizer_params=[('learning_rate', 
1e-3) ])
   
   def demo():
   bs = 8
   m = buildModel()
   initModel(m, bs)
   
   target =  np.mod (np.arange(bs,dtype="int32"),3)
   x = np.random.randn(bs,100)
   
   for i in range( 1 ):
   m.forward_backward(DataBatch( data= [mx.nd.array(x )] , label= 
[mx.nd.array(target)]) )
   res = m.get_outputs()
   m.update()
   if i == :
   print(res[0].asnumpy())
   
   m.save_params("testmultigpu.params")
   
   print( " saving model ")
   
   print(" loading model ")
   mod = buildModel()
   initModel(mod, bs)
   mod.load_params("testmultigpu.params")
   for i in range( 2 ):
   mod.forward_backward(DataBatch( data= [mx.nd.array(x )] , label= 
[mx.nd.array(target)]) )
   res = mod.get_outputs()
   mod.update()
   print(res[0].asnumpy())
   
   
   if __name__ == '__main__':
   demo()
   
   ```
   
   On single GPU (on either GPU 0 or GPU 1 ) it work as expected :
   
   > [[  9.5232e-01   2.44983039e-06   2.24760834e-06]
   >  [  3.24456596e-06   9.4159e-01   2.64155938e-06]
   >  [  2.56306998e-06   4.04469984e-06   9.3324e-01]
   >  [  9.5232e-01   3.21645393e-06   1.59501099e-06]
   >  [  3.40141946e-06   9.4636e-01   2.01853436e-06]
   >  [  2.76782998e-06   2.76159153e-06   9.4516e-01]
   >  [  9.3443e-01   4.52491850e-06   1.98577322e-06]
   >  [  2.69583552e-06   9.4874e-01   2.39593828e-06]]
   >  saving model 
   >  loading model 
   > [[  9.5232e-01   2.44855755e-06   2.24643600e-06]
   >  [  3.24292637e-06   9.4159e-01   2.64023197e-06]
   >  [  2.56174599e-06   4.04262528e-06   9.3443e-01]
   >  [  9.5232e-01   3.21489892e-06   1.59423223e-06]
   >  [  3.39969392e-06   9.4636e-01   2.01750868e-06]
   >  [  2.76647324e-06   2.76022502e-06   9.4516e-01]
   >  [  9.3443e-01   4.52262339e-06   1.98476414e-06]
   >  [  2.69446036e-06   9.4874e-01   2.39472320e-06]]
   > [[  9.5470e-01   2.32505658e-06   2.12607233e-06]
   >  [  3.09917482e-06   9.4397e-01   2.51451502e-06]
   >  [  2.44805597e-06   3.89877187e-06   9.3563e-01]
   >  [  9.5351e-01   3.07445248e-06   1.50818892e-06]
   >  [  3.24788380e-06   9.4874e-01   1.90605579e-06]
   >  [  2.64144001e-06   2.62431058e-06   9.4755e-01]
   >  [  9.3682e-01   4.37004564e-06   1.89418438e-06]
   >  [  2.57322654e-06   9.5112e-01   2.27452938e-06]]
   
   On multi GPU, it bugs at the first update (and lose all progress): 
   
   > [[  9.4874e-01   2.76984565e-06   2.39504266e-06]
   >  [  3.15983220e-06   9.4040e-01   2.84408338e-06]
   >  [  2.57450711e-06   3.42540147e-06   9.3920e-01]
   >  [  9.3920e-01   3.62951528e-06   2.51919687e-06]
   >  [  3.75006653e-06   9.4516e-01   1.67898190e-06]
   >  [  3.70834505e-06   2.99744420e-06   9.3324e-01]
   >  [  9.5351e-01   2.63477455e-06   1.99476813e-06]
   >  [  2.3003e-06   9.4159e-01   3.47498735e-06]]
   >  saving model 
   >  loading model 
   > [[  9.4874e-01   2.76847504e-06   2.39385986e-06]
   >  [  3.15823559e-06   9.4040e-01   2.84264092e-06]
   >  [  2.57316196e-06   3.42360840e-06   9.3920e-01]
   >  [  9.3920e-01   3.62769856e-06   2.51791903e-06]
   >  [  3.74813931e-06   9.4516e-01   1.67812061e-06]
   >  [  3.70651719e-06   2.99598082e-06   9.3324e-01]
   >  [  9.5351e-01   2.63343804e-06   1.99374676e-06]
   >  [  2.33214200e-06   9.4159e-01   3.47323476e-06]]
   > [[ 0.33770946  0.32504591  0.33724463]
   >  [ 0.31802508  0.34699419  0.3349807 ]
   >  [ 0.32322595  

[GitHub] cjolivier01 commented on a change in pull request #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138106410
 
 

 ##
 File path: src/operator/tensor/elemwise_unary_op.cc
 ##
 @@ -21,58 +21,63 @@
  * \file elemwise_unary_op.cc
  * \brief CPU Implementation of unary function.
  */
+#include 
 #include "./elemwise_unary_op.h"
-#include "./elemwise_binary_op.h"
+#include "./elemwise_binary_op-inl.h"
 
 namespace mxnet {
 namespace op {
+
 // relu
 MXNET_OPERATOR_REGISTER_UNARY(relu)
+MXNET_ADD_SPARSE_OP_ALIAS(relu)
 .describe(R"code(Computes rectified linear.
 
 .. math::
max(features, 0)
 
-)code" ADD_FILELINE)
-.set_attr("FGradient", ElemwiseGradUseIn{"_backward_relu"})
-.set_attr("FCompute",
-UnaryLaunch);
+The storage type of ``relu`` output depends upon the input storage type:
 
+  relu(default) = default
+  relu(row_sparse) = row_sparse
 
-MXNET_OPERATOR_REGISTER_BINARY(_backward_relu)
-.set_attr("FCompute",
-BinaryLaunch);
+)code" ADD_FILELINE)
+.set_attr("FCompute", UnaryOp::KernelCompute<
+  cpu, kernel_launch_op::relu>)
+.set_attr("FComputeEx", UnaryOp::KernelComputeEx<
+  cpu, kernel_launch_op::relu>)
+.set_attr("FGradient", ElemwiseGradUseIn{"_backward_relu"});
 
+MXNET_OPERATOR_REGISTER_BINARY_WITH_SPARSE_CPU(_backward_relu, 
kernel_launch_op::relu_grad);
 
 // sigmoid
-MXNET_OPERATOR_REGISTER_UNARY(sigmoid)
+MXNET_OPERATOR_REGISTER_UNARY_DR(sigmoid)
+MXNET_ADD_SPARSE_OP_ALIAS(sigmoid)
 .describe(R"code(Computes sigmoid of x element-wise.
 
 .. math::
y = 1 / (1 + exp(-x))
 
-)code" ADD_FILELINE)
-.set_attr("FGradient", 
ElemwiseGradUseOut{"_backward_sigmoid"})
-.set_attr("FCompute",
-UnaryLaunch);
-
+The storage type of ``sigmoid`` output is always denseThe storage type of 
``sigmoid`` output\
 
 Review comment:
   seems so. fixed.
 

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 #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138107371
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cc
 ##
 @@ -22,11 +22,12 @@
  * \brief CPU Implementation of unary function.
  */
 #include "./elemwise_unary_op.h"
-#include "./elemwise_binary_op.h"
+#include "./elemwise_binary_op-inl.h"
 
 namespace mxnet {
 namespace op {
-MXNET_OPERATOR_REGISTER_BINARY(elemwise_add)
+MXNET_OPERATOR_REGISTER_BINARY_WITH_SPARSE_CPU(elemwise_add, mshadow::op::plus)
+MXNET_ADD_SPARSE_OP_ALIAS(elemwise_add)
 
 Review comment:
   yes, we have. added other permutations.
 

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] kottmann commented on issue #7806: Fix _arange start and stop arguments default and required settings

2017-09-11 Thread git
kottmann commented on issue #7806: Fix _arange start and stop arguments default 
and required settings
URL: https://github.com/apache/incubator-mxnet/pull/7806#issuecomment-328567719
 
 
   Right, but wouldn't it make more sense to handle that case in the python 
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] cjolivier01 commented on a change in pull request #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138107371
 
 

 ##
 File path: src/operator/tensor/elemwise_binary_op_basic.cc
 ##
 @@ -22,11 +22,12 @@
  * \brief CPU Implementation of unary function.
  */
 #include "./elemwise_unary_op.h"
-#include "./elemwise_binary_op.h"
+#include "./elemwise_binary_op-inl.h"
 
 namespace mxnet {
 namespace op {
-MXNET_OPERATOR_REGISTER_BINARY(elemwise_add)
+MXNET_OPERATOR_REGISTER_BINARY_WITH_SPARSE_CPU(elemwise_add, mshadow::op::plus)
+MXNET_ADD_SPARSE_OP_ALIAS(elemwise_add)
 
 Review comment:
   yes
 

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 #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138107312
 
 

 ##
 File path: src/operator/tensor/elemwise_unary_op.cc
 ##
 @@ -242,58 +279,73 @@ Example::
 
 reciprocal([-2, 1, 3, 1.6, 0.2]) = [-0.5, 1.0, 0.3334, 0.625, 5.0]
 
+The storage type of ``reciprocal`` output is always dense
+
 )code" ADD_FILELINE)
-.set_attr("FCompute", UnaryCompute)
 .set_attr("FGradient", 
ElemwiseGradUseIn{"_backward_reciprocal"});
 
 MXNET_OPERATOR_REGISTER_BINARY(_backward_reciprocal)
 .set_attr("FCompute",
-  BinaryCompute);
+  ElemwiseBinaryOp::Compute);
 
 // abs
-MXNET_OPERATOR_REGISTER_UNARY(abs)
+MXNET_OPERATOR_REGISTER_UNARY_WITH_SPARSE(abs, cpu, mshadow_op::abs)
+MXNET_ADD_SPARSE_OP_ALIAS(abs)
 .describe(R"code(Returns element-wise absolute value of the input.
 
 Example::
 
abs([-2, 0, 3]) = [2, 0, 3]
 
+The storage type of ``abs`` output depends upon the input storage type:
+
+  abs(default) = default
 
 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] cjolivier01 commented on a change in pull request #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138106972
 
 

 ##
 File path: src/operator/tensor/elemwise_unary_op.cc
 ##
 @@ -83,15 +88,16 @@ NNVM_REGISTER_OP(_backward_copy)
   [](const NodeAttrs& attrs){
 return std::vector >{{0, 0}};
   })
+.set_attr("FCompute", UnaryOp::IdentityCompute)
+.set_attr("FComputeEx", UnaryOp::IdentityComputeEx)
+.set_attr("FInferStorageType", ElemwiseStorageType<1, 1>)
 .set_attr("FInplaceIdentity",
   [](const NodeAttrs& attrs){
 return std::vector{true};
-  })
-.set_attr("FInferStorageType", ElemwiseStorageType<1, 1>)
-.set_attr("FCompute", IdentityCompute)
-.set_attr("FComputeEx", IdentityComputeEx);
+  });
 
 MXNET_OPERATOR_REGISTER_UNARY(BlockGrad)
+MXNET_ADD_SPARSE_OP_ALIAS(BlockGrad)
 
 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] cjolivier01 commented on a change in pull request #7577: Sparse operators for unary and binary elemwise NDArray operators.

2017-09-11 Thread git
cjolivier01 commented on a change in pull request #7577: Sparse operators for 
unary and binary elemwise NDArray operators.
URL: https://github.com/apache/incubator-mxnet/pull/7577#discussion_r138106410
 
 

 ##
 File path: src/operator/tensor/elemwise_unary_op.cc
 ##
 @@ -21,58 +21,63 @@
  * \file elemwise_unary_op.cc
  * \brief CPU Implementation of unary function.
  */
+#include 
 #include "./elemwise_unary_op.h"
-#include "./elemwise_binary_op.h"
+#include "./elemwise_binary_op-inl.h"
 
 namespace mxnet {
 namespace op {
+
 // relu
 MXNET_OPERATOR_REGISTER_UNARY(relu)
+MXNET_ADD_SPARSE_OP_ALIAS(relu)
 .describe(R"code(Computes rectified linear.
 
 .. math::
max(features, 0)
 
-)code" ADD_FILELINE)
-.set_attr("FGradient", ElemwiseGradUseIn{"_backward_relu"})
-.set_attr("FCompute",
-UnaryLaunch);
+The storage type of ``relu`` output depends upon the input storage type:
 
+  relu(default) = default
+  relu(row_sparse) = row_sparse
 
-MXNET_OPERATOR_REGISTER_BINARY(_backward_relu)
-.set_attr("FCompute",
-BinaryLaunch);
+)code" ADD_FILELINE)
+.set_attr("FCompute", UnaryOp::KernelCompute<
+  cpu, kernel_launch_op::relu>)
+.set_attr("FComputeEx", UnaryOp::KernelComputeEx<
+  cpu, kernel_launch_op::relu>)
+.set_attr("FGradient", ElemwiseGradUseIn{"_backward_relu"});
 
+MXNET_OPERATOR_REGISTER_BINARY_WITH_SPARSE_CPU(_backward_relu, 
kernel_launch_op::relu_grad);
 
 // sigmoid
-MXNET_OPERATOR_REGISTER_UNARY(sigmoid)
+MXNET_OPERATOR_REGISTER_UNARY_DR(sigmoid)
+MXNET_ADD_SPARSE_OP_ALIAS(sigmoid)
 .describe(R"code(Computes sigmoid of x element-wise.
 
 .. math::
y = 1 / (1 + exp(-x))
 
-)code" ADD_FILELINE)
-.set_attr("FGradient", 
ElemwiseGradUseOut{"_backward_sigmoid"})
-.set_attr("FCompute",
-UnaryLaunch);
-
+The storage type of ``sigmoid`` output is always denseThe storage type of 
``sigmoid`` output\
 
 Review comment:
   seems so
 

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 issue #7806: Fix _arange start and stop arguments default and required settings

2017-09-11 Thread git
cjolivier01 commented on issue #7806: Fix _arange start and stop arguments 
default and required settings
URL: https://github.com/apache/incubator-mxnet/pull/7806#issuecomment-328565848
 
 
   I suppose that not specifying a param *ie stop=xxx" in a line such as for 
arange(10), then "10" goes into the first parameter, which is 'start'.  I'm not 
sure that this is avoidable.
 

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] starimpact commented on issue #7837: threaded_engine error when running distributed training program

2017-09-11 Thread git
starimpact commented on issue #7837: threaded_engine error when running 
distributed training program
URL: 
https://github.com/apache/incubator-mxnet/issues/7837#issuecomment-328522401
 
 
   follow the #6084, but got another error:
   ```
   [20:49:12] 
/home/mingzhang/work/dmlc/mxnet_v0.8.0/dmlc-core/include/dmlc/logging.h:235: 
[20:49:12] src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   [20:49:12] 
/home/mingzhang/work/dmlc/mxnet_v0.8.0/dmlc-core/include/dmlc/logging.h:235: 
[20:49:12] src/engine/./threaded_engine.h:306: [20:49:12] 
src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   An fatal error occurred in asynchronous engine operation. If you do not know 
what caused this error, you can try set environment variable MXNET_ENGINE_TYPE 
to NaiveEngine and run with debugger (i.e. gdb). This will force all operations 
to be synchronous and backtrace will give you the series of calls that lead to 
this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
   terminate called after throwing an instance of 'dmlc::Error'
 what():  [20:49:12] src/engine/./threaded_engine.h:306: [20:49:12] 
src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   An fatal error occurred in asynchronous engine operation. If you do not know 
what caused this error, you can try set environment variable MXNET_ENGINE_TYPE 
to NaiveEngine and run with debugger (i.e. gdb). This will force all operations 
to be synchronous and backtrace will give you the series of calls that lead to 
this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
   bash: line 1: 41816 Aborted python Train_Dist_Batch_Plate.py
   Exception in thread Thread-40:
   Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
   self.run()
 File "/usr/lib/python2.7/threading.py", line 763, in run
   self.__target(*self.__args, **self.__kwargs)
 File 
"/home/mingzhang/work/reid/face_reid/distribution/./dmlc-core/tracker/dmlc_tracker/ssh.py",
 line 63, in run
   subprocess.check_call(prog, shell = True)
 File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
   raise CalledProcessError(retcode, cmd)
   CalledProcessError: Command 'ssh -o StrictHostKeyChecking=no 10.1.3.105 -p 
22 'export MXNET_ENABLE_GPU_P2P=0; export DMLC_ROLE=worker; export 
DMLC_PS_ROOT_PORT=9093; export DMLC_PS_ROOT_URI=192.168.3.104; export 
DMLC_NUM_SERVER=36; export DMLC_NUM_WORKER=6;export DMLC_INTERFACE=p15p1; cd 
/tmp/mxnet_face2; python Train_Dist_Batch_Plate.py'' returned non-zero exit 
status 134
   
   ```
 

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] starimpact commented on issue #7837: threaded_engine error when running distributed training program

2017-09-11 Thread git
starimpact commented on issue #7837: threaded_engine error when running 
distributed training program
URL: 
https://github.com/apache/incubator-mxnet/issues/7837#issuecomment-328522401
 
 
   got another error:
   ```
   [20:49:12] 
/home/mingzhang/work/dmlc/mxnet_v0.8.0/dmlc-core/include/dmlc/logging.h:235: 
[20:49:12] src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   [20:49:12] 
/home/mingzhang/work/dmlc/mxnet_v0.8.0/dmlc-core/include/dmlc/logging.h:235: 
[20:49:12] src/engine/./threaded_engine.h:306: [20:49:12] 
src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   An fatal error occurred in asynchronous engine operation. If you do not know 
what caused this error, you can try set environment variable MXNET_ENGINE_TYPE 
to NaiveEngine and run with debugger (i.e. gdb). This will force all operations 
to be synchronous and backtrace will give you the series of calls that lead to 
this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
   terminate called after throwing an instance of 'dmlc::Error'
 what():  [20:49:12] src/engine/./threaded_engine.h:306: [20:49:12] 
src/operator/./cudnn_softmax_activation-inl.h:91: Check failed: 
(cudnnSoftmaxForward(s->dnn_handle_, CUDNN_SOFTMAX_ACCURATE, softmax_mode, 
, shape_desc_, data.dptr_, , shape_desc_, out.dptr_)) == 
(CUDNN_STATUS_SUCCESS) 
   An fatal error occurred in asynchronous engine operation. If you do not know 
what caused this error, you can try set environment variable MXNET_ENGINE_TYPE 
to NaiveEngine and run with debugger (i.e. gdb). This will force all operations 
to be synchronous and backtrace will give you the series of calls that lead to 
this error. Remember to set MXNET_ENGINE_TYPE back to empty after debugging.
   bash: line 1: 41816 Aborted python Train_Dist_Batch_Plate.py
   Exception in thread Thread-40:
   Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
   self.run()
 File "/usr/lib/python2.7/threading.py", line 763, in run
   self.__target(*self.__args, **self.__kwargs)
 File 
"/home/mingzhang/work/reid/face_reid/distribution/./dmlc-core/tracker/dmlc_tracker/ssh.py",
 line 63, in run
   subprocess.check_call(prog, shell = True)
 File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
   raise CalledProcessError(retcode, cmd)
   CalledProcessError: Command 'ssh -o StrictHostKeyChecking=no 10.1.3.105 -p 
22 'export MXNET_ENABLE_GPU_P2P=0; export DMLC_ROLE=worker; export 
DMLC_PS_ROOT_PORT=9093; export DMLC_PS_ROOT_URI=192.168.3.104; export 
DMLC_NUM_SERVER=36; export DMLC_NUM_WORKER=6;export DMLC_INTERFACE=p15p1; cd 
/tmp/mxnet_face2; python Train_Dist_Batch_Plate.py'' returned non-zero exit 
status 134
   
   ```
 

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] kottmann commented on issue #7806: Fix _arange start and stop arguments default and required settings

2017-09-11 Thread git
kottmann commented on issue #7806: Fix _arange start and stop arguments default 
and required settings
URL: https://github.com/apache/incubator-mxnet/pull/7806#issuecomment-328498639
 
 
   @piiswrong That sounds strange, why would you not set stop to 10? 
   
   Maybe it would make more sense to also change the python code to set stop 
instead of start, when you actually want to set stop.
 

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] OliverColeman commented on issue #5124: image segmentation Error

2017-09-11 Thread git
OliverColeman commented on issue #5124: image segmentation  Error
URL: 
https://github.com/apache/incubator-mxnet/issues/5124#issuecomment-328435041
 
 
   For the pretrained FCN-8s model I could only find the parameters exported 
with the CPU context (FCN8s_VGG16-0019-cpu.params downloaded from the dropbox 
link as the baidu link seems to have disappeared). In 
`example/fcn-xs/image_segmentation.py`, using mxnet 0.11.0, I used this line
   ```
   fcnxs_args = {k : v.as_in_context(ctx) for k, v in fcnxs_args.items()}
   ```
   after the line
   ```
   fcnxs, fcnxs_args, fcnxs_auxs = mx.model.load_checkpoint(model_previx, epoch)
   ```
   (instead of `fcnxs_args = {('arg:%s' % k) : v.as_in_context(ctx) for k, v in 
fcnxs_args.items()}` suggested in a previous comment which doesn't work because 
it changes the parameter layer keys; perhaps there's been a change in newer 
versions of mxnet?).
   
   The above line changes the context of the loaded mxnet.ndarrays representing 
the parameters to a GPU context.
   
   On a side note, saving the execution context along with the parameter values 
and/or not allowing specifying the context to use when loading parameter values 
seems fairly mad..! Neither the model.load_checkpoint() or ndarray.load() 
functions allow specifying a new context for the loaded arrays.
   
 

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] v2up opened a new issue #7842: Where can I find detailed documents about Executor class!

2017-09-11 Thread git
v2up opened a new issue #7842: Where can I find detailed documents about 
Executor class!
URL: https://github.com/apache/incubator-mxnet/issues/7842
 
 
   
 

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] HuangZhanPeng commented on issue #7653: ipython, The kernel appears to have died. It will restart automatically.

2017-09-11 Thread git
HuangZhanPeng 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-328428918
 
 
   @hdjsjyl No?I have already change to UBUNTU 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