mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Fix too strict assert in onnx_quantizer.py (#22283)
### Description Partial answer to issue #19997. The example succeeds after this change.
This commit is contained in:
parent
6d5e970642
commit
d419df4076
1 changed files with 1 additions and 1 deletions
|
|
@ -942,7 +942,7 @@ class ONNXQuantizer(BaseQuantizer):
|
|||
self.model.model.producer_name == "onnx-quantizer" and scale_init is not None
|
||||
):
|
||||
# axis is not specified so scale_init must be a scalar.
|
||||
assert onnx.numpy_helper.to_array(scale_init).size == 1
|
||||
assert scale_init is None or onnx.numpy_helper.to_array(scale_init).size == 1
|
||||
|
||||
dqlinear_name = value_name + "_DequantizeLinear"
|
||||
dqlinear_node = self.model.find_node_by_name(dqlinear_name, self.new_nodes, self.model.graph())
|
||||
|
|
|
|||
Loading…
Reference in a new issue