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/08/24 00:33:02 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #12290: [MXNET-798][WIP] Fix the dtype cast from non float32 in Gradient computation

eric-haibin-lin commented on a change in pull request #12290: [MXNET-798][WIP] Fix the dtype cast from non float32 in Gradient computation
URL: https://github.com/apache/incubator-mxnet/pull/12290#discussion_r212494268
 
 

 ##########
 File path: src/executor/infer_graph_attr_pass.cc
 ##########
 @@ -254,7 +254,8 @@ nnvm::Graph InferAttr(nnvm::Graph &&ret,
         dispatch_mode = &dispatch_modes[nid];
         if (dispatch_modes[nid] == DispatchMode::kUndefined) forward_known = false;
       }
-      auto finfer = finfer_shape.get(inode.source->op(), fdefault);
+      auto finfer = (inode.source->op() == Op::Get("_zeros")) ? fdefault :
+        finfer_shape.get(inode.source->op(), fdefault);
 
 Review comment:
   Are you sure about this? This affects all _zero ops, not just for the case you mentioned.

----------------------------------------------------------------
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