You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ibsidorenko (via GitHub)" <gi...@apache.org> on 2023/04/10 15:56:23 UTC

[GitHub] [tvm] ibsidorenko commented on a diff in pull request #14536: [QNN] Implement 'qnn.softmax'

ibsidorenko commented on code in PR #14536:
URL: https://github.com/apache/tvm/pull/14536#discussion_r1161842215


##########
tests/python/relay/test_pass_fake_quantization_to_integer.py:
##########
@@ -1114,5 +1114,36 @@ def test_fake_quantize_take():
     compare_fq_to_int(op, [x_np])
 
 
+def test_fake_quantize_softmax():

Review Comment:
   Looks like this test does not allow to check accuracy in full.
   
   I have printed out output and found that ~70% of output values is equal to **0.0** in this test. This is because output after `qnn.quantize` operation is equal to **"-128"**. It is not very interesting/representative case for **"int8"** data type.
   
   Can you slightly modify this test in the following way:
   
   1. Remove second `qnn.dequantize`. Let's check output of `qnn.dequantize` + `softmax` + `qnn.quantize` only
   2. Play with QNN parameters (zero point, scale) in a such way that output from quantize will be in the range [-100, +100] fo r example. Not only **"-128"** like now
   
   P.S.
   I have checked output after `qnn.quantize` and see that some of value have diff by **7**. I think it is too much and the accuracy is unsatisfactory... any thoughts?



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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org