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/02 06:04:33 UTC

[GitHub] reminisce commented on a change in pull request #13697: [MKLDNN] Enable signed int8 support for convolution.

reminisce commented on a change in pull request #13697: [MKLDNN] Enable signed int8 support for convolution.
URL: https://github.com/apache/incubator-mxnet/pull/13697#discussion_r253150799
 
 

 ##########
 File path: python/mxnet/contrib/quantization.py
 ##########
 @@ -286,12 +283,12 @@ def _get_optimal_threshold(arr, num_bins=8001, num_quantized_bins=255):
     min_val = np.min(arr)
     max_val = np.max(arr)
     th = max(abs(min_val), abs(max_val))
+    if min_val >= 0:
+        num_quantized_bins = (num_quantized_bins // 2) * 4 + 1
 
 Review comment:
   What's this for?

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