Tools to convert ONNX files (NCHW) to TensorFlow format (NHWC)
Authors/Creators
Description
Summary
- prefer the identity permutation for NHWC-preserved InstanceNormalization inputs when candidate permutation errors are effectively tied
- require non-identity permutations to beat identity by more than the existing 1e-2 strict-mode acceptance threshold before selecting them
- keep the original minimum-error behavior for non-NHWC inputs and clear non-identity wins
Refs #930
Review notes
The issue attachment was downloadable and the reported command path was exercised locally. In this scratch environment, that full model still fails later in a downstream Conv shape mismatch, so this PR focuses on the InstanceNormalization permutation tie-break described in the issue rather than claiming full model conversion success.
Checks
- python3 -m py_compile onnx2tf/ops/InstanceNormalization.py
- git diff --check
- lightweight tie-break assertion script for near-tie, clear-win, and non-NHWC cases
Local smoke context
A synthetic InstanceNormalization conversion completed in the side-run scratch environment before review. A follow-up tf_converter smoke after review reached TensorFlow/TFLite converter logging but hung in this local environment, so it was terminated without changing the repo.
What's Changed
- Prefer layout-preserving tie-break for InstanceNormalization by @aaronday-dev in https://github.com/PINTO0309/onnx2tf/pull/931
New Contributors
- @aaronday-dev made their first contribution in https://github.com/PINTO0309/onnx2tf/pull/931
Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.4.0...2.4.1
Notes
Files
PINTO0309/onnx2tf-2.4.1.zip
Files
(3.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:26f6a3a6a3685c2b6e34a3742f29b261
|
3.3 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/PINTO0309/onnx2tf/tree/2.4.1 (URL)
Software
- Repository URL
- https://github.com/PINTO0309/onnx2tf