anirudh2290 commented on a change in pull request #11827: fix for bug #10868: 
_backward_softsign activation is incorrect
URL: https://github.com/apache/incubator-mxnet/pull/11827#discussion_r203837194
 
 

 ##########
 File path: src/operator/nn/activation.cc
 ##########
 @@ -44,11 +44,18 @@ struct ActivationGrad {
                                           const std::vector<nnvm::NodeEntry>& 
ograds) const {
     std::vector<nnvm::NodeEntry> heads(ograds.begin(), ograds.end());
     heads.emplace_back(nnvm::NodeEntry{n, activation::kOut, 0});
-#if (MXNET_USE_CUDNN == 1 || MXNET_USE_MKLDNN == 1)
+
     const NodeAttrs& attrs = n->attrs;
+    if (dmlc::get<ActivationParam>(attrs.parsed).act_type == 
activation::kSoftSign) {
 
 Review comment:
   nit: cache act_type to avoid repeated calls ..

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to