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/02/15 01:21:12 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #14153: Fix shape inference pass

eric-haibin-lin commented on a change in pull request #14153: Fix shape inference pass
URL: https://github.com/apache/incubator-mxnet/pull/14153#discussion_r257076083
 
 

 ##########
 File path: src/executor/infer_graph_attr_pass.cc
 ##########
 @@ -282,26 +285,28 @@ nnvm::Graph InferAttr(nnvm::Graph &&ret,
   };
 
   size_t last_num_unknown;
-  size_t num_unknown_dispatch_mode = dispatch_mode_name ? node_end - node_start : 0;
-  size_t num_unknown_entry_attr = entry_end - entry_start;
-  size_t num_unknown = num_unknown_entry_attr + num_unknown_dispatch_mode;
+  size_t num_unknown = static_cast<size_t>(-1);  // Infinity
+
+  if (scalars_only) {
+    size_t num_unknown_dispatch_mode = dispatch_mode_name ? node_end - node_start : 0;
+    size_t num_unknown_entry_attr = entry_end - entry_start;
+    num_unknown = num_unknown_entry_attr + num_unknown_dispatch_mode;
+  }
   int i = 0;
   do {
-    if (i % 2 == 0) {
 
 Review comment:
   why is `if (i % 2 == 0)` removed? 

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