zhaoyang-star commented on code in PR #12624:
URL: https://github.com/apache/tvm/pull/12624#discussion_r957139971
##########
python/tvm/relay/frontend/qnn_torch.py:
##########
@@ -571,9 +602,12 @@ def quantized_relu(data, input_zero_point):
return _op.tensor.maximum(data, zp)
-def quantized_sigmoid(data, input_scale, input_zero_point):
- output_scale = input_scale
- output_zero_point = input_zero_point
+def quantized_sigmoid(inputs):
+ data = inputs[0]
+ output_scale = _expr.const(inputs[1])
+ output_zero_point = _expr.const(inputs[2])
+ input_scale = _expr.const(inputs[3])
+ input_zero_point = _expr.const(inputs[4])
Review Comment:
Yes. One example printing the `inputs[1-4]` is `0.00390625, 0,
0.09818686544895172, 96
`, in which `0.00390625, 0` are the output scale/zp.
The index of output quantized params is set on Line 275: `"aten::sigmoid":
(1, 2),`
--
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]