mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-18 18:52:16 +00:00
Fix onnx quantizer activation and weight type attribute (#17651)
In [`quantize_subgraph`](https://github.com/microsoft/onnxruntime/blob/v1.16.0/onnxruntime/python/tools/quantization/onnx_quantizer.py#L188-L189) `self.weight_qType` and `self.activation_qType` are [integers](https://github.com/microsoft/onnxruntime/blob/v1.16.0/onnxruntime/python/tools/quantization/onnx_quantizer.py#L115-L116) while `ONNXQuantizer` expects `QuantType`
This commit is contained in:
parent
0d60604638
commit
63acaf47d2
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue