yuanfz98 commented on code in PR #11729:
URL: https://github.com/apache/tvm/pull/11729#discussion_r898043135


##########
tests/python/frontend/pytorch/qnn_test.py:
##########
@@ -347,6 +360,7 @@ def test_quantized_modules():
         # sample outputs
         """
         relu 0.0039215684 2.6052087e-08 0.9999933567176871
+        leaky_relu 0.25097468 0.16687508 0.0036936649659863948

Review Comment:
   Oups! Sorry for the mistake !
   ```
   dequantized = dequant * _op.nn.leaky_relu(dequant, alpha)
   ```
   ->
   ```
   dequantized = _op.nn.leaky_relu(dequant, alpha)
   ```
   
   ```
   tvm_result= [[[[0.42745024 0.7333321  0.9333317  ... 0.18039185 0.4627443
       0.06666655]
      [0.5607833  0.65490085 0.1333331  ... 0.19607809 0.1333331
       0.42352867]
      [0.84705734 0.83921427 0.07058811 ... 0.47843054 0.25490153
       0.5215677 ]
      ...
      [0.9568611  0.34117588 0.07450967 ... 0.10196061 0.8078417
       0.3607837 ]
      [0.4627443  0.24705839 0.6156852  ... 0.47843054 0.8980377
       0.18039185]
      [0.8941161  0.9686258  0.19215654 ... 0.0823528  0.6784302
       0.27843088]]
   
     [[0.69803804 0.7490183  0.14509779 ... 0.06274499 0.01960781
       0.28235245]
      [0.21960747 0.1137253  0.32548964 ... 0.7647046  0.75686145
       0.2156859 ]
      [0.97254735 0.98823357 0.06666655 ... 0.79999864 0.0509803
       0.45882273]
      ...
      [0.70195955 0.8313711  0.40784243 ... 0.06666655 0.96078265
       0.662744  ]
      [0.74509674 0.52941084 0.76862615 ... 0.09411748 0.5019599
       0.21176434]
      [0.14117622 0.6784302  0.74509674 ... 0.88627297 0.07843123
       0.56862646]]
   
     [[0.32156807 0.30588183 0.01960781 ... 0.70195955 0.7411752
       0.09019592]
      [0.68235177 0.6901949  0.33725432 ... 0.12156842 0.52941084
       0.9686258 ]
      [0.28627402 0.3098034  0.7921555  ... 0.43921494 0.98431206
       0.01568625]
      ...
      [0.9764689  0.8352927  0.49019524 ... 0.7098027  0.6470577
       0.8941161 ]
      [0.09411748 0.31372494 0.921567   ... 0.54117554 0.09019592
       0.00392156]
      [0.8196064  0.49019524 0.1333331  ... 0.05490187 0.02745093
       0.2588231 ]]]]
   pt_result= [[[[0.42745024 0.7333321  0.9333317  ... 0.18039185 0.4627443
       0.06666655]
      [0.5607833  0.65490085 0.1333331  ... 0.19607809 0.1333331
       0.42352867]
      [0.84705734 0.83921427 0.07058811 ... 0.47843054 0.25490153
       0.5215677 ]
      ...
      [0.9568611  0.34117588 0.07450967 ... 0.10196061 0.8078417
       0.3607837 ]
      [0.4627443  0.24705839 0.6156852  ... 0.47843054 0.8980377
       0.18039185]
      [0.8941161  0.9686258  0.19215654 ... 0.0823528  0.6784302
       0.27843088]]
   
     [[0.69803804 0.7490183  0.14509779 ... 0.06274499 0.01960781
       0.28235245]
      [0.21960747 0.1137253  0.32548964 ... 0.7647046  0.75686145
       0.2156859 ]
      [0.97254735 0.98823357 0.06666655 ... 0.79999864 0.0509803
       0.45882273]
      ...
      [0.70195955 0.8313711  0.40784243 ... 0.06666655 0.96078265
       0.662744  ]
      [0.74509674 0.52941084 0.76862615 ... 0.09411748 0.5019599
       0.21176434]
      [0.14117622 0.6784302  0.74509674 ... 0.88627297 0.07843123
       0.56862646]]
   
     [[0.32156807 0.30588183 0.01960781 ... 0.70195955 0.7411752
       0.09019592]
      [0.68235177 0.6901949  0.33725432 ... 0.12156842 0.52941084
       0.9686258 ]
      [0.28627402 0.3098034  0.7921555  ... 0.43921494 0.98431206
       0.01568625]
      ...
      [0.9764689  0.8352927  0.49019524 ... 0.7098027  0.6470577
       0.8941161 ]
      [0.09411748 0.31372494 0.921567   ... 0.54117554 0.09019592
       0.00392156]
      [0.8196064  0.49019524 0.1333331  ... 0.05490187 0.02745093
       0.2588231 ]]]]
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to