You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/02/01 17:56:55 UTC

[GitHub] szha commented on a change in pull request #9662: Gluon PReLU, ELU, SELU, Swish

szha commented on a change in pull request #9662: Gluon PReLU, ELU, SELU, Swish
URL: https://github.com/apache/incubator-mxnet/pull/9662#discussion_r165437542
 
 

 ##########
 File path: src/operator/leaky_relu-inl.h
 ##########
 @@ -177,9 +182,20 @@ class LeakyReLUOp : public Operator {
       case leakyrelu::kPReLU: {
         weight = in_data[leakyrelu::kGamma].get<xpu, 1, real_t>(s);
         grad_weight = in_grad[leakyrelu::kGamma].get<xpu, 1, real_t>(s);
-        grad_weight = sumall_except_dim<1>(F<prelu_grad>(data) * grad);
-        gdata = F<mshadow_op::xelu_grad>(data, mshadow::expr::broadcast<1>(weight, data.shape_))
-                * grad;
+        if (weight.shape_[0] == 1) {
 
 Review comment:
   Existing PReLU had two problems:
   1. gamma parameter was never documented and can't be passed in using kwargs.
   2. it doesn't support scalar broadcast as was attempted in #8912 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services