jinhuang415 commented on a change in pull request #10433: [MXNET-290] MKLDNN 
support for model quantization
URL: https://github.com/apache/incubator-mxnet/pull/10433#discussion_r189499693
 
 

 ##########
 File path: src/operator/quantization/quantize_graph_pass.cc
 ##########
 @@ -159,7 +159,7 @@ Graph QuantizeGraph(Graph &&src) {
         uint32_t min_index = 1;
         uint32_t max_index = 2;
         if (quantized_op_map.count(e.node->op())) {
-          size_t  num_outputs = e.node->num_outputs();
+          size_t  num_outputs = mirror_node->num_outputs() - 2;
 
 Review comment:
   I think this change should apply for all cases, since here we want to add 
min/max data (output from new_node's previous node) to the quantized new_node's 
input, so looks it is more proper to use previous node (also quantized version 
node, in this case is mirror_node) to calculate the number_outputs and the 
min/max index (it's possible one OP's FP32 and INT8 version can have different 
output so using FP32 version to calculate may not be able to represent INT8's 
case, for example, for CPU, FP32 and INT8 pooling can have different output 
number)
   @reminisce Could you help to review the logic here?

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


With regards,
Apache Git Services

Reply via email to