You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/06 21:58:54 UTC

[GitHub] [tvm] anwang2009 commented on a diff in pull request #10924: [FQ2I] Add log op to FQ2I

anwang2009 commented on code in PR #10924:
URL: https://github.com/apache/tvm/pull/10924#discussion_r844454872


##########
tests/python/relay/test_pass_fake_quantization_to_integer.py:
##########
@@ -374,6 +377,19 @@ def test_fake_quantize_image_resize_bilinear():
     compare_fq_to_int(op, [x_np], allow_rounding_error=True)
 
 
+def test_fake_quantize_image_resize_bilinear():
+    x = relay.var("x", shape=[1, 3, 224, 224], dtype="int8")
+
+    zero = relay.const(0)
+    x = relay.qnn.op.dequantize(x, relay.const(2.0), zero)
+    op = relay.image.resize2d(x, size=[4, 4], method="linear")
+    op = relay.qnn.op.quantize(op, relay.const(2.0), zero)
+
+    x_np = np.random.randint(-128, 127, size=[1, 3, 224, 224], dtype="int8")
+
+    compare_fq_to_int(op, [x_np], allow_rounding_error=True)

Review Comment:
   looks like this block shouldn't have been committed, remove?



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