Fix onnx quantizer activation and weight type attribute

#17651
This commit is contained in:
Yufeng Li 2023-10-05 09:30:34 -07:00 committed by GitHub
parent f480a3618a
commit c3fd281620
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,8 +112,8 @@ class ONNXQuantizer:
False if "ActivationSymmetric" not in self.extra_options else self.extra_options["ActivationSymmetric"]
)
self.activation_qType = activation_qType.tensor_type
self.weight_qType = weight_qType.tensor_type
self.activation_qType = getattr(activation_qType, "tensor_type", activation_qType)
self.weight_qType = getattr(weight_qType, "tensor_type", weight_qType)
"""
Dictionary specifying the min and max values for tensors. It has following format:
{