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 2019/06/19 10:39:16 UTC

[GitHub] [incubator-mxnet] starimpact commented on issue #14383: MXNET_BACKWARD_DO_MIRROR is broken

starimpact commented on issue #14383: MXNET_BACKWARD_DO_MIRROR is broken
URL: https://github.com/apache/incubator-mxnet/issues/14383#issuecomment-503506623
 
 
   I think the following code for MXNET_BACKWARD_DO_MIRROR has problem. 
   it will do not use mirror even the MXNET_BACKWARD_DO_MIRROR is on unless the __force_mirroring__ is set.
   ```cpp
    260   int do_mirror = dmlc::GetEnv("MXNET_BACKWARD_DO_MIRROR", 0);
    261   auto need_mirror = [do_mirror](const nnvm::Node& node) -> int {
    262     if (node.is_variable()) return 0;
    263     const std::string& type = node.attrs.op->name;
    264     if (type == "Dropout") return false;
    265     if (get_node_attr(node, "__force_mirroring__", false)) return true;
    266     if (do_mirror == 0) return false;
    267     if (type == "Convolution") return false;
    268     if (type == "FullyConnected") return false;
    269     if (type == "Concat") return false;
    270     if (type == "SoftmaxOutput") return false;
    271     if (type == "BatchNorm") return false;
    272     if (type == "CuDNNBatchNorm") return false;
    273     return true;
    274   };
   ```

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


With regards,
Apache Git Services