anijain2305 commented on a change in pull request #6018:
URL: https://github.com/apache/incubator-tvm/pull/6018#discussion_r453240904



##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -358,12 +358,16 @@ def has_same_qnn_params(self, lhs_tensor, rhs_tensor):
         rhs_scale = rhs_tensor.qnn_params['scale']
         lhs_zero_point = lhs_tensor.qnn_params['zero_point']
         rhs_zero_point = rhs_tensor.qnn_params['zero_point']
-        lhs_scale_value = get_scalar_from_constant(lhs_scale)
-        rhs_scale_value = get_scalar_from_constant(rhs_scale)
-        lhs_zero_point_value = get_scalar_from_constant(lhs_zero_point)
-        rhs_zero_point_value = get_scalar_from_constant(rhs_zero_point)
-        return lhs_scale_value == rhs_scale_value and \
-                lhs_zero_point_value == rhs_zero_point_value
+        # 0.1 + 0.2 != 0.3

Review comment:
       I am little confused here. IIUC, scale and zero points are tuple only 
for weights. So, for maximum and minimum, we should not need to change this 
function.
   
   Imo, the changes should be very similar to reshape op
   
https://github.com/apache/incubator-tvm/blob/c9c77c6b76f7cff3bc6afbf9d3ef2200e3fdbb91/python/tvm/relay/frontend/tflite.py#L472-L477
   
   
   Basically check that that qnn params are same and nothing else.
   
   Let me know if I understood something incorrectly.




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


Reply via email to