TaoLv commented on a change in pull request #16075: Integrate MKL-DNN leakyrelu
URL: https://github.com/apache/incubator-mxnet/pull/16075#discussion_r321311980
 
 

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_act.cc
 ##########
 @@ -79,18 +93,30 @@ mkldnn::algorithm GetMKLDNNActAlgo(const ActivationParam& 
param) {
   }
 }
 
+mkldnn::algorithm GetMKLDNNActAlgo(const LeakyReLUParam& param) {
+  switch (param.act_type) {
+    case leakyrelu::kLeakyReLU:
+      return mkldnn::algorithm::eltwise_relu;
+    case leakyrelu::kELU:
+      return mkldnn::algorithm::eltwise_elu;
+    default:
+      LOG(FATAL) << "unknown activation type";
 
 Review comment:
   More descriptive error message"
   ```suggestion
         LOG(FATAL) << "unknown activation type for LeakyReLU: " << 
param.act_type;
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to