Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tf2onnx/rewriter/quantization_ops_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def create_qdq_nodes(g, match_results):
zero_point = zero_point[0]
attrs = {}
else:
utils.make_sure(axis, "Axis must be specified for per channel quantization")
utils.make_sure(axis and axis != -1, "Axis must be specified for per channel quantization")
utils.make_sure(g.opset >= 13, "Opset >= 13 is required for per channel quantization")
attrs = {'axis': axis}

# Split it into QuantizeLinear and DequantizeLinear and remove the QDQ node reference
Expand Down