mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Cjian/per channels not working (#13038)
**Description**: This fix the bug where per_channel quantization isn't working when axis == 0
This commit is contained in:
parent
6248b69795
commit
051a0a67a5
1 changed files with 1 additions and 1 deletions
|
|
@ -255,7 +255,7 @@ class QDQQuantizer(ONNXQuantizer):
|
|||
|
||||
def _add_qdq_pair_for_initializer(self, weight_proto, tensor_type, axis=None):
|
||||
weight_name = weight_proto.name
|
||||
if axis:
|
||||
if axis is not None:
|
||||
if self.opset_version < 13:
|
||||
raise ValueError("Per-Channel support with QDQ format requires onnx opset version 13 or above.")
|
||||
q_weight_name, zp_name, scale_name = self.quantize_weight_per_channel(
|
||||
|
|
|
|||
Loading…
Reference in a new issue