NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
A tool for converting ONNX files to LiteRT/TFLite/TensorFlow, PyTorch native code (nn.Module), TorchScript (.pt), state_dict (.pt), Exported Program (.pt2), and Dynamo ONNX. It also supports direct conversion from LiteRT to PyTorch.
Last release 20 days ago
14 Sep 2026
Release timing varies
gaps range from 8 days to 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
629 releases · first in 2022
One column per quarter.
This PR consolidates fix-fe updates focused on INT8 conversion stability and op coverage in the flatbuffer_direct path.
This PR consolidates fix-fe updates focused on INT8 conversion stability and op coverage in the flatbuffer_direct path.
com.microsoft domain supplementation for selected quantized ops during conversion/evaluation.
QLinearAdd, QLinearMul, QLinearConcat, QLinearAveragePool, QLinearGlobalAveragePool, QLinearSigmoid, QGemm.QLinearAveragePool implementation (onnx2tf/ops/QLinearAveragePool.py) and flatbuffer_direct lowering/validation.QGemm implementation (onnx2tf/ops/QGemm.py) and flatbuffer_direct lowering/validation.QLinearSoftmax support in flatbuffer_direct registry/validators.QLinearConv behavior to align more closely with ONNX semantics:
PADV2 when needed.MaxPool padding/ceil_mode handling enhancements.QLinearGlobalAveragePool lowering to a stable path:
DEQUANTIZE -> MEAN -> QUANTIZE unconditionally (avoid AVERAGE_POOL_2D instability).-cotof auto-triggers ONNX/TFLite check for flatbuffer_direct outputs.Executed:
python onnx2tf/onnx2tf.py -i handpose_estimation_mediapipe_2023feb_int8.onnx -cotof -tb flatbuffer_direct --report_op_coverageObserved:
pass=True; this PR primarily targets conversion/runtime stability and op support/coverage.Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.12...2.0.13
Extend flatbuffer_direct lowering/optimization pipeline for QAT INT8 ONNX models, focusing on reducing redundant transpose and quantize/dequantize bri
Extend flatbuffer_direct lowering/optimization pipeline for QAT INT8 ONNX models, focusing on reducing redundant transpose and quantize/dequantize bridges.
Add ONNX frontend support for QLinearGlobalAveragePool and implement a dedicated flatbuffer-direct lowering path with quantized AVERAGE_POOL_2D preference (fallback to DEQUANTIZE -> MEAN -> QUANTIZE when constraints are not met).
Improve NHWC propagation and graph sanitization passes to avoid unnecessary transpose insertion and remove dead tensors/operators safely.
https://huggingface.co/opencv/face_detection_yunet/blob/main/face_detection_yunet_2023mar_int8.onnx
onnx2tf -i face_detection_yunet_2023mar_int8.onnx \
-cotof \
-tb flatbuffer_direct \
--report_op_coverage
https://huggingface.co/opencv/person_reid_youtureid/blob/main/person_reid_youtu_2021nov_int8.onnx
onnx2tf -i person_reid_youtu_2021nov_int8.onnx \
-cotof \
-tb flatbuffer_direct \
--report_op_coverage
| INT8 ONNX | INT8 TFLite(LiteRT) |
|---|---|
| <img width="300" alt="Image" src="https://github.com/user-attachments/assets/c1411cb7-35aa-489d-ad87-291d64b766ec" /> | <img width="300" alt="Image" src="https://github.com/user-attachments/assets/41aefe26-f243-45fb-9d21-9e16c7ef30b3" /> |
Quantize/DequantizeADD/SUB/MUL/DIV)QUANTIZE -> DEQUANTIZE cleanup for float outputsFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.11...2.0.12
This PR extends flatbuffer_direct for quantized ONNX graphs and documents the updated support matrix.
This PR extends flatbuffer_direct for quantized ONNX graphs and documents the updated support matrix.
face_recognition_sface_2021dec_int8.onnx.zip
| ONNX | LiteRT |
|---|---|
| <img width="375" height="612" alt="image" src="https://github.com/user-attachments/assets/5f06c5e7-392a-4bd1-8330-1fd7b4b10268" /> | <img width="383" height="761" alt="image" src="https://github.com/user-attachments/assets/923dbe31-3434-4e5f-9156-cfe523a991d7" /> |
Added direct lowering for quantized operators in flatbuffer_direct:
QuantizeLinear -> QUANTIZEDequantizeLinear -> DEQUANTIZEQLinearAdd -> ADDQLinearMul -> MULQLinearConv -> CONV_2D / DEPTHWISE_CONV_2DQLinearMatMul -> FULLY_CONNECTEDAdded flatbuffer_direct-only preprocess fusion:
DequantizeLinear -> BatchNormalization -> PRelu -> QuantizeLinearMul + Add form before lowering.Added supporting direct builders and registry coverage:
BatchNormalization direct builder (MUL + ADD form)Flatten direct builder (RESHAPE form)Updated README support status section for flatbuffer_direct.
onnx2tf/tflite_builder/op_builders/quantized.pyscale, zero_point, quantized_dimension) for both:
QLinear*)DequantizeLinear / QuantizeLinear)input_scale * weight_scale)onnx2tf/tflite_builder/op_registry.py with new DispatchEntrys and validators:
_validate_quantize_dequantize_linear_validate_qlinear_binary_validate_qlinear_conv_validate_qlinear_matmul_validate_batch_norm_validate_flattenonnx2tf/tflite_builder/preprocess/rules/quant_chain_fusion.pyonnx2tf/tflite_builder/preprocess/rules/__init__.pyonnx2tf/tflite_builder/preprocess/__init__.pyquant_chain_fusion_wave3tests/test_tflite_builder_direct.py
tests/test_tflite_builder_preprocess.py
test_quant_chain_fusion_wave3_rewrites_dq_bn_prelu_q_chainpytest -q tests/test_tflite_builder_preprocess.py tests/test_tflite_builder_direct.py
72 passedValidated with:
face_recognition_sface_2021dec_int8.onnxpython -m onnx2tf -i face_recognition_sface_2021dec_int8.onnx -o /tmp/onnx2tf_sface_pr_check -tb flatbuffer_direct --report_op_coverage -nCoverage report highlights:
conversion_error = nullgraph_summary.supported_nodes = 278 / 278graph_summary.unsupported_nodes = 0graph_summary.coverage_ratio = 1quant_chain_fusion_wave3 applied (matched_patterns=26, rewritten_patterns=26)pyproject.toml: 2.0.11onnx2tf/__init__.py: 2.0.112.0.11.Supplement for additional commit 1090987.
PRelu to PRELU in flatbuffer_direct
onnx2tf/tflite_builder/op_builders/elementwise.py:215INT8/UINT8), alpha (slope) is converted to a quantized constant with quantization metadata
onnx2tf/tflite_builder/op_builders/elementwise.py:185PRelu dispatch and validator in the registry
onnx2tf/tflite_builder/op_registry.py:664onnx2tf/tflite_builder/op_registry.py:940PRelu expansion from pseudo_ops_wave1; PRelu is now handled by direct builder without decomposition
onnx2tf/tflite_builder/preprocess/rules/pseudo_ops.py:489PRELU builtin options mapping in model writer
onnx2tf/tflite_builder/model_writer.py:202README.md:280 (builtin count 38)README.md:315 (PRelu row)tests/test_tflite_builder_direct.py:881 (verifies PRELU builtin emission)pytest -q tests/test_tflite_builder_preprocess.py tests/test_tflite_builder_direct.py tests/test_tflite_builder_op_coverage.py76 passedface_recognition_sface_2021dec_int8.onnx)--report_op_coverage): unsupported 0 / coverage 1.0PRelu nodes are dispatch_mode=builtinPRelu (Neg/Relu/Mul/Sub) was consolidated into a single PRELU opFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.10...2.0.11
improve rewrite_tflite_inout_opname I/O tensor index resolution for -coion
rewrite_tflite_inout_opname I/O tensor index resolution for -coionserving_default_, :0, /, __ -> :)tensorIndex assignment to use real tensor indices (instead of buffer - 1)2.0.10 (pyproject.toml, onnx2tf/__init__.py) and sync Docker tag examples in READMEWhen multiple inputs/outputs have identical shapes, shape-only matching cannot reliably preserve ONNX I/O name/order. This change reduces reliance on shape heuristics and uses stable metadata first.
python -m py_compile onnx2tf/utils/common_functions.py onnx2tf/__init__.pyFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.9...2.0.10
This PR improves robustness in quantized conversion paths and adds a new NonMaxSuppression option for class-score shrinking.
This PR improves robustness in quantized conversion paths and adds a new NonMaxSuppression option for class-score shrinking.
It addresses three concrete conversion failures seen during real model conversion, and adds a user-facing CLI/API switch for NMS behavior.
While converting quantized and post-process-heavy models, the following failure patterns were observed:
QLinearConv aborted when output shape metadata was None in the auto_pad == 'NOTSET' path.QLinearConv depthwise weight reshape failed with mismatched element counts (invalid reshape target).PRelu failed broadcasting when slope was channel-first style (e.g. [C,1,1]) but runtime tensor layout was channel-last.In addition, for some NMS post-processing models (e.g. DAMO-YOLO style layouts), users requested a mode to shrink scores class dimension by argmax before NMS.
File: onnx2tf/ops/QLinearConv.py
output_tensor_shape[2:] directlyNone before comparison[..., input_weights_shape[2], input_weights_shape[3] // group][..., -1, input_weights_shape[3] // group]Conv.py and avoids invalid reshape size errors.File: onnx2tf/ops/PRelu.py
[N,H,W,C][C,1,1][1,1,C]--output_nms_with_argmax (-onwa)Files:
onnx2tf/onnx2tf.pyonnx2tf/ops/NonMaxSuppression.pyREADME.mdAdded new CLI/API option to shrink class dimension of NMS scores:
[B, C, N][B, 1, N]Implementation details in NonMaxSuppression.py:
argmax(scores, axis=1)reduce_max(..., keepdims=True))[batch_index, class_index, box_index] by gathering class ids for selected boxes<img width="495" height="322" alt="image" src="https://github.com/user-attachments/assets/576a47f1-3f7e-4644-a38c-135124fb5a7a" />
<img width="1380" height="505" alt="image" src="https://github.com/user-attachments/assets/f9f7d18a-8af3-44c9-8894-0652e937fab2" /> <img width="826" height="600" alt="image" src="https://github.com/user-attachments/assets/5c7b05fc-db25-4f75-af51-9b6bd86e546c" /> <img width="1396" height="268" alt="image" src="https://github.com/user-attachments/assets/918af08a-bd8b-47f7-a364-b78634bcd39b" />
Files:
README.md
onnx2tf/__init__.py
pyproject.toml
Documented the new NMS argmax option in README (CLI and Python API sections).
Updated version from 2.0.8 to 2.0.9.
python -m py_compile onnx2tf/onnx2tf.py onnx2tf/ops/QLinearConv.py onnx2tf/ops/PRelu.py onnx2tf/ops/NonMaxSuppression.py onnx2tf/__init__.py[batch, class, box].--output_nms_with_argmax is explicitly enabled.QLinearConv and PRelu changes are defensive and targeted at previously failing shape/layout edge cases.Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.8...2.0.9
Forced to avoid the problem of onnx normality check terminating abnormally due to the presence of Gelu, which should not exist in opset=17.
Gelu
Gelu, which should not exist in opset=17.--test_data_nhwc_path (-tdnp) support for validation input loading.-tdnp and -cind.-tdnp uses a single NHWC test array and reuses it across eligible inputs (after per-input resize/layout conversion).-tdnp; use -cind when per-input control is needed.Gelu by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/868test_data_nhwc_path by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/870Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.7...2.0.8
Build and install from source code.
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.6...2.0.7
flatbuffer introduces an opt-in direct TFLite generation backend and related tooling.
flatbuffer introduces an opt-in direct TFLite generation backend and related tooling.
tflite_backend switch with tf_converter (default) and flatbuffer_directonnx2tf/tflite_builder/ module tree (IR, lowering, op dispatch/builders, model writer).tfliteschema.fbs tag handling*_op_coverage_report.json)--flatbuffer_direct_fallback_to_tf_converterflatbuffer_direct is experimentalmain: 67onnx2tf/tflite_builder/** and new direct-path test suitestf_converter remains default).Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.5...2.0.6
ai_edge_litert==2.1.2 by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/837
ai_edge_litert==2.1.2ai_edge_litert==2.1.2 by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/837Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.4...2.0.5
Running onnx2tf.py -i densenet-12.onnx -cotof failed at Mul (sng_Mul_1) with a broadcast shape mismatch.
onnx2tf.py -i densenet-12.onnx -cotof failed at Mul (sng_Mul_1) with a broadcast shape mismatch.x: (1, 112, 112, 64)y: (1, 64, 1, 1) (channel-first style)shape_unmatched_special_avoidance_workaround, some transpose paths converted constant np.ndarray inputs into tf.Tensor.explicit_broadcast behavior changed and the constant was no longer normalized to NHWC-compatible shape.(1, 64, 1, 1) instead of (1, 1, 1, 64), causing tf.math.multiply to fail.onnx2tf/utils/common_functions.pyshape_unmatched_special_avoidance_workaround_transpose_preserve_array(tensor, perm)np.transpose when tensor is np.ndarraytranspose_with_flexing_deterrence for tensor-like inputs_transpose_preserve_array so constants keep np.ndarray type through alignment.explicit_broadcast to correctly reshape constants to channel-last form when needed.y is now normalized to (1, 1, 1, 64), and Mul executes successfully.python onnx2tf/onnx2tf.py -i densenet-12.onnx -cotofexit code 0)Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.3...2.0.4
Introduced onnx2tf/gs.py and migrated away from onnx_graphsurgeon.
onnx-graphsurgeon dependency (breaking change)onnx2tf/gs.py and migrated away from onnx_graphsurgeon.onnx_graphsurgeon as gs to onnx2tf.gs as gs.Constant from Variable inheritance and introduced a new Tensor base class.ScatterND after GS migration.onnx / onnxruntime.Ubuntu 24.04 / Python 3.12.onnxsim with onnxsim-prebuilt.sng / sne versions.test-models.yml, python-publish.yml, codeql-analysis.yml).README.md.tests/test_gs_compat.py).Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.24...2.0.2
Nothing published for this version
Nothing published for this version
Nothing published for this version
100% coverage of ONNX operations :bear:
CenterCropPad, Optional, TfIdfVectorizer, GroupNormalizationFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.23...1.29.24
Try native PReLU first; if it raises an exception, fall back to a pseudo‑PReLU implementation only for that failing op.
PReLU first; if it raises an exception, fall back to a pseudo‑PReLU implementation only for that failing op.onnx2tf/ops/PRelu.pyPRelu by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/827Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.22...1.29.23
Added a MaxPool guard to brute-force NCHW/NHWC axis alignment when batch-dimension mismatch is detected with fully static shapes.
1.29.22 across package metadata and documentation.conv_tasnet.onnxmodel_hawp.onnxonnx2tf/ops/MaxPool.py
onnx2tf/ops/Unique.py
sorted=1 behavior (stable lexicographic sort across subtensors) with warnings on unsupported dynamic/dtype cases.onnx2tf/ops/ScatterElements.py
indices and updates can be aligned before scatter.onnx2tf/__init__.py, pyproject.toml, README.md: version bumped to 1.29.22.MaxPool, ScatterElements, Unique by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/826Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.21...1.29.22
New CLI option --value_hints (-vh) to set dummy inference input values by input name, with * as a default fallback.
--value_hints (-vh) to set dummy inference input values by input name, with * as a default fallback.shape_hints and value_hints so OP-level TF dummy inference can inherit them without explicit plumbing.value_hints to fill inputs via np.full when custom inputs are not provided.convert() now propagates value_hints to auto-split sub-conversions and initializes dummy hint defaults at startup.has_external_data is now initialized before sng4onnx runs to avoid UnboundLocalError when onnx_graph is provided.convert() signature/argument descriptions now include value_hints with examples.--value_hints by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/825Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.20...1.29.21
sne4onnx==1.0.15 https://github.com/PINTO0309/sne4onnx
sne4onnx==1.0.15 https://github.com/PINTO0309/sne4onnxsng4onnx=1.0.5 https://github.com/PINTO0309/sng4onnx--enable_auto_split_model (short -easm), using --auto_split_max_size_mb as target size.--auto_split_max_size_mb (short -asmsm) to control target partition size (MB).sne4onnx.extraction(..., output_onnx_file_path=...) into per-part folders.input_onnx_file_path to the split ONNX path.part_0001, *_part_0001.onnx)..npy files for input/output propagation and cleans them up after conversion.pip install sne4onnx==1.0.15 sng4onnx==1.0.5
onnx2tf -i vit_h_encoder.onnx -asmsm 50 -nuo -nuonag -cotof
<img width="877" height="566" alt="image" src="https://github.com/user-attachments/assets/313666e1-b14f-402f-85bf-891bba3725da" />| Split.1 | Split.2 | Split.3 |
|---|---|---|
| <img width="462" height="253" alt="image" src="https://github.com/user-attachments/assets/0b694adc-3191-4e3e-bb46-e12a58c1ea10" /> | <img width="471" height="253" alt="image" src="https://github.com/user-attachments/assets/cfcf991f-93d8-4b50-86f1-5544ef47a1ca" /> | <img width="470" height="217" alt="image" src="https://github.com/user-attachments/assets/f51c954a-ee0c-4570-8679-beabc89ec246" /> |
split_output_layouts reliably.keep_shape_absolutely_input_names for the next part based on ONNX/TF output shape comparison.name:0) and base (name) keys to maximize cache hits.numpy.memmap.custom_input data for part1; auto-generate for later parts.dummy_tf_inference to avoid input_dtype unbound error and ensure dtype casting.GatherND, GatherElements, ScatterElements, ScatterND, TensorScatter.Document --auto_split_max_size_mb and --enable_auto_split_model (including -easm shortcut) in README.
Update API signature sections to include new parameters.
[TODO] Implementation of Proto Splitter (breakthrough of 2GB contract for Protocol Buffers) #455
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.19...1.29.20
DeformConv operation from Onnx to TFLite #469
DeformConv, DFTDeformConv, DFT by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/823Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.18...1.29.19
Support for RotaryEmbedding, Scan, StringConcat, StringSplit, TensorScatter, ImageDecoder, RMSNormalization, NegativeLogLikelihoodLoss, SoftmaxCrossEn
RotaryEmbedding, Scan, StringConcat, StringSplit, TensorScatter, ImageDecoder, RMSNormalization, NegativeLogLikelihoodLoss, SoftmaxCrossEntropyLoss, RegexFullMatchFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.17...1.29.18
Improved Concat conversion stability.
Concat
Concat conversion stability.4 * P^N
4 is the number of candidate axes (0–3).P is the number of permutation candidates per input.N is the number of input tensors.Permutation count P:
P = 24 (all 4D permutations).24^N exceeds the guard threshold (20,000), the search switches to a limited set, so P = 3.Worst-case attempts:
N=2: 4 * 24^2 = 2,304N=3: 4 * 24^3 = 55,296N=4: 24^4 exceeds the threshold, so limited mode: 4 * 3^4 = 324These are hard upper bounds; in practice the actual attempts are typically much fewer because shape-incompatible candidates are pruned before tf.concat, and the search stops early once the ONNX output shape matches.
e2pose
<img width="1556" height="478" alt="image" src="https://github.com/user-attachments/assets/2b92266c-bbc5-4178-b56f-2542f8386669" />Concat conversion stability by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/821Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.16...1.29.17
Dequantized Float32 unification for quant ops
QuantizeLinear / DequantizeLinear / DynamicQuantizeLinear / QLinearConv / QLinearMatMul now operate in Float32.is_dequantized to avoid double dequantization and redundant quant→dequant paths.QuantizeLinear output is consumed only by Cast → DequantizeLinear (or direct DequantizeLinear),
fake‑quant is bypassed and Float32 passes through.QLinearConcat now mirrors Concat behaviors, including
axis correction, NHWC handling, and shape‑mismatch avoidance.Concat when all shapes are dynamic.
Split based on sum(split).tf.split is replaced with
tf.strided_slice decomposition to avoid FlexSplitV in TFLite.| ONNX | TFLite |
|---|---|
| <img width="935" height="594" alt="image" src="https://github.com/user-attachments/assets/10528382-26db-4a12-8285-5894bea49165" /> | <img width="759" height="531" alt="image" src="https://github.com/user-attachments/assets/25c36f8c-b356-4b9b-bed9-b40caa4d7d98" /> |
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.15...1.29.16
Unable to convert zipformer to tflite #785
Shape
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.14...1.29.15
Transformation stability has been significantly improved for models with many dynamic tensors containing NonZero OPs.
Transformation stability has been significantly improved for models with many dynamic tensors containing NonZero OPs.
VLM Encoder
NonZero
apply_nonzero_passthrough to store NonZero outputs as their input tensors in ONNX dummy outputs (optionally updating graph output shapes).apply_nonzero_passthrough_tf to mirror the same passthrough behavior on TF dummy outputs.-coto/-cotof) and auto-generate-json validation flows.dummy_onnx_inference: added input_datas_for_validation output hook.dummy_tf_inference: added input_datas_for_validation output hook.Flatten
onnx2tf/ops/Flatten.py to match ONNX dummy outputs exactly when available.explicit_broadcast now reshapes 1D operands to the last axis when it matches the other operand’s last dimension, avoiding unintended transposes.
model: https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/blob/main/onnx/vision_encoder.onnx
onnx2tf \
-i vision_encoder.onnx \
-sh pixel_values:1,1,3,512,512 pixel_attention_mask:1,1,512,512
<img width="1575" height="506" alt="image" src="https://github.com/user-attachments/assets/595b7249-14fa-4b7d-b613-15916ad8ecec" /> <img width="807" height="532" alt="image" src="https://github.com/user-attachments/assets/4308a7b9-5f94-4730-8ee2-e93c0ed63f4b" />
NonZero OPs by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/818Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.13...1.29.14
Improved stability of dynamic tensor transformations.
AveragePool, Expand, Slice
-sh and -kat combination.onnx2tf -i campp_vin.onnx -kat input -sh input:1,100,80
<img width="1464" height="573" alt="image" src="https://github.com/user-attachments/assets/66fb3b33-abe4-4b49-9447-c107e67d78d9" />
<img width="642" height="537" alt="image" src="https://github.com/user-attachments/assets/61732ef8-dea5-4f3b-8f88-cbc8f6e92dc5" />
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.12...1.29.13
I adjusted the MatMul post‑processing to handle cases where the ONNX output rank is smaller than the TF matmul result by squeezing unit dims before at
MatMul, BatchMatMul
I adjusted the MatMul post‑processing to handle cases where the ONNX output rank is smaller than the TF matmul result by squeezing unit dims before attempting a transpose. This prevents the invalid perm=['0'] call that caused the Dimension must be 2 but is 1 error.
Added a small shape‑match helper and a squeeze step for trailing or leading 1 dims when ONNX output rank is smaller. Recomputed shape after squeeze and only transpose when the perm length matches the tensor rank.
onnx2tf -i rtdetrv4_s.onnx -cotof
<img width="1171" height="424" alt="image" src="https://github.com/user-attachments/assets/f3420029-af0a-426b-bbdb-29b331458f33" />
MatMul/BatchMatMul conversion stability by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/816Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.11...1.29.12
Use uv build backend by @Boulaouaney in https://github.com/PINTO0309/onnx2tf/pull/813
uv package buildrequires-python = ">=3.10.12"Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.10...1.29.11
Support for Loop, LpPool, MaxRoiPool.
Loop, LpPool, MaxRoiPool.
Loop conversion and TFLite export
SymbolicTensor error during TFLite conversion by preferring from_keras_model and falling back to from_concrete_functions only if needed.
onnx2tf/onnx2tf.pyLoop implementation fixes (conversion + inference stability)
tf.while_loop returns.cond and loop-carried scalars.If branches inside Loop).
onnx2tf/ops/Loop.pydummy_tf_inference to avoid forcing batch-size alignment for 1D inputs, which caused cond to become vector-shaped.
onnx2tf/utils/common_functions.pysuppress_log flag to print_node_info, and disabled logging during subgraph execution for Loop and If.
onnx2tf/utils/common_functions.py, onnx2tf/ops/Loop.py, onnx2tf/ops/If.pyLoop, LpPool, MaxRoiPool by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/812Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.9...1.29.10
Improved stability when handling undefined shapes.
Unsqueeze
gitFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.8...1.29.9
Not fix: https://github.com/PINTO0309/onnx2tf/issues/436
ir_version=10
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.7...1.29.8
Modes: linear, nearest, and cubic (the legacy bilinear string is mapped to linear).
GridSample
linear, nearest, and cubic (the legacy bilinear string is mapped to linear).zeros, border, and reflection.tf.gather) is used for 2D/3D to reduce gather_nd overhead.string inputs are allowed only with nearest mode.GridSample by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/809Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.6...1.29.7
Support for Attention, AffineGrid, BlackmanWindow
Attention, AffineGrid, BlackmanWindowAttention, AffineGrid, BlackmanWindow by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/808Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.5...1.29.6
Support for CumProd by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/807
CumProdCumProd by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/807Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.4...1.29.5
Support for BitwiseAnd, BitwiseNot, BitwiseOr, BitwiseXor
BitwiseAnd, BitwiseNot, BitwiseOr, BitwiseXorFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.3...1.29.4
ceil_mode=1 + Improved conversion stability for dynamic tensor
AvgPool
ceil_mode=1 + Improved conversion stability for dynamic tensor<img width="936" height="546" alt="image" src="https://github.com/user-attachments/assets/36df94aa-60e6-4062-a28c-32f56759feec" />
<img width="886" height="575" alt="image" src="https://github.com/user-attachments/assets/2b86293a-1475-4033-91ff-df62342334c5" />
onnx2tf -i campp_vin.onnx -kat input -sh input:1,100,80
<img width="1135" height="567" alt="image" src="https://github.com/user-attachments/assets/6868432d-9cea-4132-9c69-a94ec6a8dd78" />
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.2...1.29.3
Support for dilations conv 3x3 - strides 2x2
Conv
Support for dilations conv 3x3 - strides 2x2
<img width="801" height="585" alt="image" src="https://github.com/user-attachments/assets/11c30a2c-2921-4e7a-b05e-8eb18522d459" />
onnx2tf -i sgscsh.onnx -cotof
<img width="1040" height="459" alt="image" src="https://github.com/user-attachments/assets/75832561-5168-4b37-aaf6-206ca9ed80f6" />
<img width="955" height="611" alt="image" src="https://github.com/user-attachments/assets/5d08a605-c62f-4f0d-bdc4-e6aace8b3660" />
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.1...1.29.2
From: `python sequence_dtype = ONNX_DTYPES_TO_TF_DTYPES(graph_node.attrs.get('dtype', 1)) # Float32 `
SequenceEmpty
sequence_dtype = ONNX_DTYPES_TO_TF_DTYPES(graph_node.attrs.get('dtype', 1)) # Float32
sequence_dtype = ONNX_DTYPES_TO_TF_DTYPES[graph_node.attrs.get('dtype', 1)] # Float32
SequenceEmpty by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/803Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.29.0...1.29.1
Improved to convert models with a very large number of operations that exceed the combined size of RAM and SWAP.
Support for uv environment
Large model conversion
Improved to convert models with a very large number of operations that exceed the combined size of RAM and SWAP.
I offloaded all the dummy inference tensors needed for the massive amount of shape estimation to storage via np.memmap .
Essentially, this means that any large model can be converted, as long as there is enough storage space.
Conversion of dehaze_maxim_2022aug_opt_sim.onnx requires 145GB of storage instead of RAM.
ssc4onnx -if dehaze_maxim_2022aug_opt_sim.onnx
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ OP Type ┃ OPs ┃ Sizes ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Add │ 1,523 │ 301.4KiB │
│ Cast │ 48 │ 1.3KiB │
│ Concat │ 74 │ 2.0KiB │
│ Conv │ 212 │ 18.9MiB │
│ ConvTranspose │ 12 │ 1.6MiB │
│ Einsum │ 14 │ 4.9MiB │
│ Exp │ 35 │ 0.0B │
│ Gather │ 4 │ 3.5KiB │
│ Gemm │ 34 │ 13.0MiB │
│ GreaterOrEqual │ 24 │ 96.0B │
│ MatMul │ 416 │ 33.2MiB │
│ Max │ 272 │ 1.1KiB │
│ Mul │ 2,579 │ 83.9KiB │
│ Neg │ 35 │ 0.0B │
│ Not │ 24 │ 0.0B │
│ Reciprocal │ 275 │ 0.0B │
│ ReduceSum │ 512 │ 30.2KiB │
│ Reshape │ 1,060 │ 36.5KiB │
│ Slice │ 240 │ 22.5KiB │
│ Sqrt │ 240 │ 0.0B │
│ Squeeze │ 34 │ 272.0B │
│ Sub │ 480 │ 0.0B │
│ Tanh │ 152 │ 0.0B │
│ Transpose │ 952 │ 85.7KiB │
│ Unsqueeze │ 22 │ 176.0B │
│ ---------------------- │ ---------- │ ---------- │
│ Total number of OPs │ 9,273 │ │
│ ---------------------- │ ---------- │ ---------- │
│ Total params │ 18.0M │ │
│ ====================== │ ========== │ ========== │
│ Model Size │ 65.6MiB │ 72.3MiB │
└────────────────────────┴────────────┴────────────┘
INFO: file: dehaze_maxim_2022aug_opt_sim.onnx
INFO: opset: 13
INFO: input_name.1: input_image shape: [1, 3, 512, 640] dtype: float32
INFO: output_name.1: Identity_6__0 shape: [1, 128, 160, 3] dtype: float32
INFO: output_name.2: Identity_7__0 shape: [1, 256, 320, 3] dtype: float32
INFO: output_name.3: Identity_8__0 shape: [1, 512, 640, 3] dtype: float32
INFO: output_name.4: Identity_9__0 shape: [1, 128, 160, 3] dtype: float32
INFO: output_name.5: Identity_10__0 shape: [1, 256, 320, 3] dtype: float32
INFO: output_name.6: Identity_11__0 shape: [1, 512, 640, 3] dtype: float32
INFO: Finish!
<img width="1045" height="184" alt="image" src="https://github.com/user-attachments/assets/04cdde58-a2ed-466b-b821-5b4d33b20826" />
<img width="428" height="264" alt="image" src="https://github.com/user-attachments/assets/7548b928-7e0b-47e7-82b8-86ff9bb402f7" />
<img width="1450" height="470" alt="image" src="https://github.com/user-attachments/assets/0d20384c-8409-43a4-bf67-894e2db843a5" />
Improvement of huge model transformation (implementation of Out of Memory workaround) #679
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.8...1.29.0
Quantization option ``` quant_norm_mean: Optional[str] Normalized average value during quantization.\n Only valid when the "-cind" option is not used.
quant_norm_mean: Optional[str]
Normalized average value during quantization.\n
Only valid when the "-cind" option is not used.\n
Default: "[[[[0.485, 0.456, 0.406]]]]"
quant_norm_std: Optional[str]
Normalized standard deviation during quantization.\n
Only valid when the "-cind" option is not used.\n
Default: "[[[[0.229, 0.224, 0.225]]]]"
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.7...1.28.8
ir_version=10, kernel_shape handling
ir_version=10, kernel_shape handling
Conv
Support for ir_version=10, where kernel_shape was deleted
<img width="1504" height="367" alt="image" src="https://github.com/user-attachments/assets/f775555c-d202-488f-afa8-9710b7181121" />
<img width="1079" height="502" alt="image" src="https://github.com/user-attachments/assets/4a7b466b-7173-495e-a7cf-458ff50309e9" />
axes don't match array, input Conv : [ Torch -> ONNX -> TFLite ] #797
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.6...1.28.7
common_functions.py In the original code, when downloading test image data from GitHub releases, the program switches to Wasabi Storage if the request
common_functions.py
In the original code, when downloading test image data from GitHub releases, the program switches to Wasabi Storage if the request times out. However, the request to Wasabi Storage did not include a timeout parameter, which could cause the program to hang for a long time on unstable networks.
Added a timeout=(1.0, 5.0) parameter to the request when downloading from Wasabi Storage, so that in case of unstable network, the program will properly notify the user of a download failure instead of hanging indefinitely.
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.5...1.28.6
- Fix Dockerfile Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.4...1.28.5
DockerfileFull Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.4...1.28.5
Fix combine_fixes arguments by @sn2234 in https://github.com/PINTO0309/onnx2tf/pull/793
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.3...1.28.4
` -agje, --auto_generate_json_on_error Attempts to generate a parameter replacement JSON when accuracy validation finds errors greater than 1e-2. Usef
-agje, --auto_generate_json_on_error
Attempts to generate a parameter replacement JSON when accuracy validation finds errors
greater than 1e-2. Useful for quickly capturing fixes during -cotof runs.
Disabled by default to avoid unexpected file generation.
--auto_generate_json_on_error by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/792Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.2...1.28.3
MatMul Op MatMul improved resource usage for matrix shape compatibility check.
MatMul
Op MatMul improved resource usage for matrix shape compatibility check.
Content and background The MatMul op converter tries to numerically optimize operation M=A*B. To only optimize compatible shapes, a check is present. The current check uses np.matmul on dummy matrices to verify the output shape is compatible with expected shape. For some of the compatible shapes (due to broadcasting), this can consume significant resources both in compute time and memory.
Summary of corrections Add a function to compute shape returned via np.matmul without actually running the np.matmul. In case the function fails (incompatible shapes) and returns None, use current implementation with np.matmul to verify the result (based on my internal unit tests it seems np.matmul can be safely removed, but I left it as it no longer poses threat of high resource usage).
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.1...1.28.2
Fix boolean parameter replacement
Fix boolean parameter replacement
The replace_parameter function converts parameter values from JSON replacement files into appropriate Python types during ONNX model conversion. A case-sensitivity bug prevented proper conversion of the capitalized boolean string "True", causing it to remain as a string instead of being converted to boolean True, which affects both the parameter replacement feature and the new auto-JSON generation feature.
The bug occurred because the code called .lower() on the input string (converting "True" → "true") but then compared against "True" (capital T), so "true" == "True" returned False and conversion failed. The fix was to change the comparison from replace_value.lower() == "True" to replace_value.lower() == "true". Note that "False" was not affected as it correctly compared against "false".
Use the following program to test it:
import sys
from onnx2tf.utils.common_functions import replace_parameter
result = replace_parameter(
value_before_replacement=False,
param_target='test',
param_name='test',
op_rep_params=[{'param_target': 'test', 'param_name': 'test', 'values': 'True'}]
)
print(f'Output: {result} (type: {type(result).__name__})')
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.28.0...1.28.1
[Experimental] Added automatic JSON generation function
[Experimental] Added automatic JSON generation function
Currently, this is a trial implementation and only supports a very limited number of OPs. If I feel like it, I will expand the OPs that are the target of JSON auto-generation.
https://github.com/PINTO0309/onnx2tf/blob/main/AUTO_JSON_FEATURE_SUMMARY.md
# Automatic JSON generation only
# Generates an optimal parameter replacement JSON file for model conversion.
# The JSON file is saved to {model_name}_auto.json when conversion errors occur
# or accuracy issues are detected.
onnx2tf -i model.onnx -agj
# Accuracy validation only (no JSON generation)
# Validates the accuracy between ONNX and TensorFlow outputs without generating
# any parameter replacement JSON file.
onnx2tf -i model.onnx -cotof
# Accuracy validation + automatic JSON generation
# First generates an optimal parameter replacement JSON file, then uses it
# to validate the model accuracy. This ensures the best possible conversion accuracy.
onnx2tf -i model.onnx -agj -cotof
-agj, --auto_generate_json
Automatically generates a parameter replacement JSON file that achieves minimal error
when converting the model. This option explores various parameter combinations to find
the best settings that result in successful conversion and highest accuracy.
The search stops when the final output OP accuracy check shows "Matches".
When used together with -cotof, the generated JSON is used to re-evaluate accuracy.
WARNING: This option performs an exhaustive search to find the optimal conversion patterns,
which can take a very long time depending on the model complexity.
onnx2tf doesn't work after exporting PINTO0309/LightGlue-ONNX #772
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.10...1.28.0
Fixed handling of dynamic tensors in --broadcast_for_gpu_delegate
common_functions.py
--broadcast_for_gpu_delegatebroadcast_for_gpu_delegate by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/769Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.9...1.27.10
onnx2tf.py, common_functions.py
onnx2tf.py, common_functions.py
replace_yolov9t_dynamic.json
Support for shape_hints.
With the addition of this feature, conversion is now possible even when there are multiple dynamic dimensions other than batch size. It can be used mainly for debugging by arbitrarily changing the size of intermediate tensors.
You can now specify input tensors of any size for accuracy evaluation using the -cotof and -coto options.
The introduction of shape_hints is the first step toward implementing a feature that automatically corrects conversion errors in models with dynamic tensor inputs within the onnx2tf processing.
In future versions, I plan to make the --shape_hints option mandatory when specifying models that use dynamic tensors as input.
-sh SHAPE_HINTS [SHAPE_HINTS ...], \
--shape_hints SHAPE_HINTS [SHAPE_HINTS ...]
Shape hints for input tensors containing dynamic dimensions.
Specify input shapes for test inference with -cotof or -coto.
Unlike `--overwrite_input_shape`, this operation does not overwrite
the ONNX input shape with a static shape.
The format is
"i1:dim0,...,dimN" "i2:dim0,...,dimN" "i3:dim0,...,dimN"
When there is only one input, for example,
"data:1,3,224,224"
When there are multiple inputs, for example,
"data1:1,3,224,224" "data2:1,3,112" "data3:5"
A value of 1 or more must be specified.
Numerical values other than dynamic dimensions are ignored.
shape_hints: Optional[List[str]]
Shape hints for input tensors containing dynamic dimensions.
Specify input shapes for test inference with -cotof or -coto.
Unlike `--overwrite_input_shape`, this operation does not overwrite
the ONNX input shape with a static shape.
The format is
['i1:dim0,...,dimN', 'i2:dim0,...,dimN', 'i3:dim0,...,dimN']
When there is only one input, for example,
['data:1,3,224,224']
When there are multiple inputs, for example,
['data1:1,3,224,224', 'data2:1,3,112', 'data3:5']
A value of 1 or more must be specified.
Numerical values other than dynamic dimensions are ignored.
Example of use with YOLOv9-T [N, 3, H, W]
yolov9_t_wholebody28_Nx3HxW.onnx.zip <details><summary>JSON <b>replace_yolov9t_dynamic.json</b></summary>
{
"format_version": 1,
"operations": [
{
"op_name": "/model.22/Gather",
"param_target": "inputs",
"param_name": "/model.22/Constant_output_0",
"values": 0
},
{
"op_name": "/model.22/Gather_3",
"param_target": "inputs",
"param_name": "/model.22/Constant_6_output_0",
"values": 1
},
{
"op_name": "/model.22/Gather_4",
"param_target": "inputs",
"param_name": "/model.22/Constant_7_output_0",
"values": 2
},
{
"op_name": "/model.22/Gather_5",
"param_target": "inputs",
"param_name": "/model.22/Constant_6_output_0",
"values": 1
},
{
"op_name": "/model.22/Gather_6",
"param_target": "inputs",
"param_name": "/model.22/Constant_7_output_0",
"values": 2
},
{
"op_name": "/model.22/Gather_1",
"param_target": "inputs",
"param_name": "/model.22/Constant_6_output_0",
"values": 1
},
{
"op_name": "/model.22/Gather_2",
"param_target": "inputs",
"param_name": "/model.22/Constant_7_output_0",
"values": 2
},
{
"op_name": "/model.22/Concat_23",
"param_target": "attributes",
"param_name": "axis",
"values": 2
},
{
"op_name": "/model.22/Slice",
"param_target": "op",
"begin": [0,0,0],
"end": [0,64,0],
"end_mask": 5
},
{
"op_name": "/model.22/dfl/Gather",
"param_target": "inputs",
"param_name": "/model.22/Constant_output_0",
"values": 0
},
{
"op_name": "/model.22/dfl/Gather_1",
"param_target": "inputs",
"param_name": "/model.22/Constant_6_output_0",
"values": 2
},
{
"op_name": "/model.22/dfl/Reshape",
"param_target": "inputs",
"param_name": "/model.22/dfl/Concat_output_0",
"pre_process_transpose_perm": [0,2,1]
},
{
"op_name": "/model.22/dfl/Reshape",
"param_target": "inputs",
"param_name": "/model.22/Slice_output_0",
"pre_process_transpose_perm": [0,2,1]
},
{
"op_name": "/model.22/dfl/Transpose",
"param_target": "attributes",
"param_name": "perm",
"values": [0,2,1,3]
},
{
"op_name": "/model.22/dfl/Softmax",
"param_target": "attributes",
"param_name": "axis",
"values": 1
},
{
"op_name": "/model.22/dfl/Softmax",
"param_target": "outputs",
"param_name": "/model.22/dfl/Softmax_output_0",
"post_process_transpose_perm": [0,2,3,1]
},
{
"op_name": "/model.22/Slice_1",
"param_target": "op",
"begin": [0,64,0],
"end": [0,92,0],
"end_mask": 5
},
{
"op_name": "/model.22/Slice_2",
"param_target": "op",
"begin": [0,0,0],
"end": [0,2,0],
"end_mask": 5
},
{
"op_name": "/model.22/Slice_3",
"param_target": "op",
"begin": [0,2,0],
"end": [0,3,0],
"end_mask": 5
},
{
"op_name": "/model.22/Mul_3",
"param_target": "inputs",
"param_name": "/model.22/Transpose_1_output_0",
"pre_process_transpose_perm": [1,0]
},
{
"op_name": "/model.22/Concat_24",
"param_target": "attributes",
"param_name": "axis",
"values": 1
}
]
}
</details>
convert
onnx2tf \
-i yolov9_t_wholebody28_Nx3HxW.onnx \
-coion \
-cotof \
-sh "images:1,3,480,640" \
-prf replace_yolov9t_dynamic.json \
shape_hints by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/767Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.8...1.27.9
[Experimental] Dynamic AveragePool support !image !image
AveragePool
Tests https://github.com/PINTO0309/onnx2tf/releases/download/1.27.1/rec.onnx
replace_rec.json{
"model": "https://github.com/PINTO0309/onnx2tf/releases/download/1.27.1/rec.onnx",
"issue": "https://github.com/PINTO0309/onnx2tf/issues/747",
"command": "onnx2tf -i rec.onnx -prf replace_rec.json",
"format_version": 1,
"operations": [
{
"op_name": "p2o.Transpose.2",
"param_target": "attributes",
"param_name": "perm",
"values": [0,1,3,2]
},
{
"op_name": "p2o.Transpose.5",
"param_target": "attributes",
"param_name": "perm",
"values": [0,1,3,2]
},
{
"op_name": "p2o.Transpose.7",
"param_target": "attributes",
"param_name": "perm",
"values": [0,1,2,3]
}
]
}
onnx2tf -i rec.onnx -prf replace_rec.json -coion
Results rec_float32.tflite.zip
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.7...1.27.8
onnx2tf.py, common_functions.py
onnx2tf.py, common_functions.py
Skipped (Deleted or Shape Unmatched) occurs.wa/.Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.6...1.27.7
Bug fix for parameter substitution processing.
onnx2tf.py
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.5...1.27.6
Supports individual parameter replacement for Unsqueeze and Slice
Unsqueeze, Slice
Unsqueeze and Slice{
"format_version": 1,
"operations": [
{
"op_name": "Concat_551",
"param_target": "attributes",
"param_name": "axis",
"values": 2
},
{
"op_name": "Gather_560",
"param_target": "attributes",
"param_name": "axis",
"values": 2
},
{
"op_name": "Unsqueeze_655",
"param_target": "attributes",
"param_name": "axes",
"values": [1]
},
{
"op_name": "Slice_657",
"param_target": "inputs",
"param_name": "2062",
"values": [0]
},
{
"op_name": "Slice_657",
"param_target": "inputs",
"param_name": "2029",
"values": [2]
},
{
"op_name": "Slice_657",
"param_target": "inputs",
"param_name": "1538",
"values": [3]
},
{
"op_name": "Slice_657",
"param_target": "inputs",
"param_name": "2015",
"values": [1]
}
]
}
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.4...1.27.5
Improved stability when handling tensors of any undefined shape.
Reshape, Resize
NonMaxSuppression, NonZero, If, TopK https://github.com/PINTO0309/onnx2tf#parameter-replacementValueError: Exception encountered when calling layer 'tf.math.subtract_2' (type TFOpLambda).
Dimensions must be equal, but are 4 and 2 for '{{node model_79/tf.math.subtract_2/Sub}} = Sub[T=DT_FLOAT](model_79/tf.strided_slice_84/StridedSlice, model_79/tf.tile/Tile)' with input shapes: [1,5,1,4], [1,1,6400,2].
Call arguments received by layer 'tf.math.subtract_2' (type TFOpLambda):
• x=tf.Tensor(shape=(1, 5, 1, 4), dtype=float32)
• y=tf.Tensor(shape=(1, 1, 6400, 2), dtype=float32)
Reshape, Resize by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/762Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.3...1.27.4
Since Keras v2 supports output of saved_model containing GroupConvolution, the warning message is no longer necessary.
Conv, GroupConvolution
saved_model containing GroupConvolution, the warning message is no longer necessary.Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.2...1.27.3
Split now supports input of dynamically sized tensors, improving conversion stability
Split
Split now supports input of dynamically sized tensors, improving conversion stabilitySplit.
Split now supports input of dynamically sized tensors, improving conversion stability by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/753Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.1...1.27.2
Add, Div, Mod, Mul, Sub, Cast, MatMul
Add, Div, Mod, Mul, Sub, Cast, MatMul
torch.autocast("cuda", dtype=torch.float16)torch.autocast("cuda", dtype=torch.float16) by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/746Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.27.0...1.27.1
from tensorflow==2.17.0 to tensorflow==2.19.0
tensorflow==2.17.0 to tensorflow==2.19.0tf-keras~=2.16 to tf-keras==2.19.0tf.lite.Interpreter() to ai_edge_litert.interpreter.Interpreter()
ai-edge-litert==1.2.0Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.26.9...1.27.0
Fixed the logic to avoid a TensorFlow bug that caused the output tensor of tf.norm() to be (None, None, None, None).
ReduceL1, ReduceL2
tf.norm() to be (None, None, None, None).ReduceL1 or ReduceL2.INFO: 20 / 819
INFO: onnx_op_type: ReduceL2 onnx_op_name: wa/model/stages/stages.0/blocks/blocks.0/mlp/grn/ReduceL2
INFO: input_name.1: wa/model/stages/stages.0/blocks/blocks.0/mlp/act/Mul_1_output_0 shape: [1, 56, 56, 512] dtype: float32
INFO: output_name.1: wa/model/stages/stages.0/blocks/blocks.0/mlp/grn/ReduceL2_output_0 shape: [1, 1, 1, 512] dtype: float32
INFO: tf_op_type: l2_normalize
INFO: input.1.x: name: tf.math.multiply_8/Mul:0 shape: (1, 56, 56, 512) dtype: <dtype: 'float32'>
INFO: input.2.axis: val: [1, 2]
INFO: output.1.output: name: tf.compat.v1.norm_6/norm/transpose_1:0 shape: (None, None, None, None) dtype: <dtype: 'float32'>
tf.norm() to be (None, None, None, None) by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/743Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/1.26.8...1.26.9
Your coding agent can read these notes before it upgrades. Set up the MCP server →