anijain2305 commented on a change in pull request #4880: [QNN] Add support for
per channel weight scale in dense op
URL: https://github.com/apache/incubator-tvm/pull/4880#discussion_r379277612
##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -982,13 +982,15 @@ def convert_fully_connected(self, op):
weight_value = self.get_tensor_value(weight_tensor)
weight_expr = self.exp_tab.new_const(weight_value,
dtype=weight_tensor_type_str)
+ weight_shape = _infer_shape(weight_expr)
if input_tensor.qnn_params:
out = _qnn.op.dense(in_expr, weight_expr,
input_zero_point=input_tensor.qnn_params['zero_point'],
kernel_zero_point=weight_tensor.qnn_params['zero_point'],
input_scale=input_tensor.qnn_params['scale'],
kernel_scale=weight_tensor.qnn_params['scale'],
+ units=weight_shape[1],
Review comment:
Should it weight_shape[0]. Dense input shapes are m * k and n * k.
And units means n here, right?
----------------------------------------------------------------
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]
With regards,
Apache Git Services