[GitHub] pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.

2018-03-29 Thread GitBox
pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.
URL: https://github.com/apache/incubator-mxnet/pull/10089#issuecomment-377450041
 
 
   @zheng-da @piiswrong Fixed the issue in the local and PR on the road by 
@jinhuang415 


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] pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.

2018-03-14 Thread GitBox
pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.
URL: https://github.com/apache/incubator-mxnet/pull/10089#issuecomment-372914320
 
 
   @zheng-da tests/python/unittest/test_loss.py fail too which used softrelu.
   I will look the case you pointed. 
   
   > ==
   > 
   > FAIL: test_loss.test_bce_loss
   > 
   > --
   > 
   > Traceback (most recent call last):
   > 
   >   File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in 
runTest
   > 
   > self.test(*self.arg)
   > 
   >   File "/work/mxnet/tests/python/unittest/common.py", line 157, in test_new
   > 
   > orig_test(*args, **kwargs)
   > 
   >   File "/work/mxnet/tests/python/unittest/test_loss.py", line 100, in 
test_bce_loss
   > 
   > assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.01
   > 
   > AssertionError: 
   > 
   >  >> begin captured logging << 
   > 


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] pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.

2018-03-14 Thread GitBox
pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.
URL: https://github.com/apache/incubator-mxnet/pull/10089#issuecomment-372914320
 
 
   @zheng-da tests/python/unittest/test_loss.py fail too which used softrelu.
   I will look the case you pointed. 


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] pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.

2018-03-13 Thread GitBox
pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.
URL: https://github.com/apache/incubator-mxnet/pull/10089#issuecomment-372908964
 
 
   Look at the code, two implementations are the difference for the soft_relu. 
So, we get the different results.
   
   mxnet:
   
https://github.com/apache/incubator-mxnet/blob/c9ec3118688c233a66ad847003a9e8d2d09e5952/src/operator/mshadow_op.h#L136
   
   ```
   /*! \brief SoftReLU, also known as softplus activation */
   struct softrelu : public mxnet_op::tunable {
 template
 MSHADOW_XINLINE static DType Map(DType a) {
   // Avoid overflow of exp for large inputs.
   // Thresholds 20.0 is chosen such that softrelu(a) = a
   // for a > 20 using floating precision
   if (a > DType(20.0f)) {
 return a;
   } else {
 return DType(math::log1p(math::exp(a)));
   }
 }
   };
   
   MXNET_UNARY_MATH_OP(softrelu_grad, -math::expm1(-a));
   
   ```
   
   mkldnn:
   
https://github.com/intel/mkl-dnn/blob/f5218ff4fd2d16d13aada2e632afd18f2514fee3/tests/gtests/test_eltwise.cpp#L101
   
   
   ```
   template 
   T soft_relu_fwd(T s) {
   return logf(1 + ::expf(s));
   }
   
   template 
   T soft_relu_bwd(T dd, T s) {
   return dd / (1 + ::expf(-s));
   }
   ```
   
   


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] pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.

2018-03-13 Thread GitBox
pengzhao-intel commented on issue #10089: enable all activations in MKLDNN.
URL: https://github.com/apache/incubator-mxnet/pull/10089#issuecomment-372867519
 
 
   @zheng-da thanks a lot. I will follow up with our team :)


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