FrozenGene commented on a change in pull request #4696: 
[Relay][Frontend][TFlite] Add support for quantized LOGISTIC
URL: https://github.com/apache/incubator-tvm/pull/4696#discussion_r374193768
 
 

 ##########
 File path: python/tvm/relay/frontend/tflite.py
 ##########
 @@ -384,7 +401,16 @@ def convert_logistic(self, op):
         input_tensor = input_tensors[0]
         in_expr = self.get_expr(input_tensor.tensor_idx)
 
+        output_tensors = self.get_output_tensors(op)
+        assert len(output_tensors) == 1, "output tensors length should be 1"
+        output_tensor = output_tensors[0]
+
+        if input_tensor.qnn_params:
+            in_expr = self.dequantize(in_expr, input_tensor)
         out = _op.sigmoid(in_expr)
 
 Review comment:
   Does the INT computation of sigmoid is very complex so that we could only 
`dequantize->float compute->requantize`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to