Onnx2tf

Latest version: v1.26.3

Safety actively analyzes 688323 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 42 of 85

1.7.26

- `Add`, `Sub`, `Mul`, `Div`, `Mod`
- [Experimental] Deterring shape corruption due to broadcast. Transformer conversion stability improvement. (3D and below only)
- While it is not possible to prevent accuracy degradation after conversion, it is possible to avoid processing interruptions due to conversion errors as much as possible.

What's Changed
* [Experimental] Deterring shape corruption due to broadcast. Transformer conversion stability improvement. (3D and below only) by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/247


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.25...1.7.26

1.7.25

- `CumSum`
- TensorFlow's `tf.math.cumsum` does not support boolean, so temporarily cast to INT32 for calculation.
- [[PARSeq] Conversion from ONNX to Tensorflow 245](https://github.com/PINTO0309/onnx2tf/issues/245)
- https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_245/parseq.onnx

What's Changed
* TensorFlow's tf.math.cumsum does not support boolean, so temporarily cast to INT32 for calculation. `CumSum` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/246


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.24...1.7.25

1.7.24

- `ConvTranspose`
- Fixed out-of-range reference errors for begin and end when executing `Slice` for padding removal after `ConvTranspose` generation.
- If `begin` or `end` is an irregular padding size, focusing only on `begin` and the maximum size of the tensor will break the tensor.
- Modified to remove padding from only before the tensor, only after the tensor, or both before and after, depending on the padding size of `begin` and `end`.

error: 'tf.Slice' op requires 0 <= begin[i] <= begin[i] + size[i] <= Di


loc(fused["Slice:", callsite("model/tf.slice/Slice"("/usr/local/lib/python3.8/dist-packages/keras/engine/training.py":558:0) at callsite("/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py":65:0 at callsite("/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py":812:0 at callsite("/usr/local/lib/python3.8/dist-packages/tensorflow/python/autograph/core/function_wrappers.py":113:0 at callsite("/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py":812:0 at callsite("/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py":1189:0 at callsite("/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py":667:0 at callsite("/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py":1214:0 at callsite("/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py":300:0 at "/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py":396:0)))))))))]): error: 'tf.Slice' op requires 0 <= begin[i] <= begin[i] + size[i] <= Di
[E] No function: __iter__ registered for opset: 13
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/xxxx/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 1913, in <module>
main()
File "/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 1867, in main
model = convert(
File "/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 875, in convert
tflite_model = converter.convert()
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/lite.py", line 1897, in convert
return super(TFLiteConverterV2, self).convert()
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/lite.py", line 962, in wrapper
return self._convert_and_export_metrics(convert_func, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/lite.py", line 940, in _convert_and_export_metrics
result = convert_func(self, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/lite.py", line 1546, in convert
return super(TFLiteFrozenGraphConverterV2,
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/lite.py", line 1166, in convert
result = _convert_graphdef(
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/convert_phase.py", line 212, in wrapper
raise converter_error from None Re-throws the exception.
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/convert_phase.py", line 205, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/convert.py", line 817, in convert_graphdef
data = convert(
File "/usr/local/lib/python3.8/dist-packages/tensorflow/lite/python/convert.py", line 322, in convert
raise converter_error
tensorflow.lite.python.convert_phase.ConverterError: /usr/local/lib/python3.8/dist-packages/keras/engine/training.py:558:0: error: 'tf.Slice' op requires 0 <= begin[i] <= begin[i] + size[i] <= Di
/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py:65:0: note: called from
/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py:812:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/autograph/core/function_wrappers.py:113:0: note: called from
/home/xxxx/git/onnx2tf/onnx2tf/onnx2tf.py:812:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py:1189:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py:667:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py:1214:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py:300:0: note: called from
/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py:396:0: note: called from

- [MSPFN](https://github.com/kuijiang94/MSPFN)
- https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_243/mspfn_320x480.onnx


ssc4onnx -if mspfn_320x480.onnx

┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ OP Type ┃ OPs ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Add │ 438 │
│ Concat │ 59 │
│ Conv │ 260 │
│ ConvTranspose │ 121 │
│ GlobalAveragePool │ 51 │
│ Min │ 273 │
│ Mul │ 333 │
│ Relu │ 273 │
│ Sigmoid │ 60 │
│ Split │ 3 │
│ Sub │ 1 │
│ Tanh │ 6 │
│ Transpose │ 7 │
│ ---------------------- │ ---------- │
│ Total number of OPs │ 1885 │
│ ====================== │ ========== │
│ Model Size │ 403.2MiB │
└────────────────────────┴────────────┘
INFO: file: mspfn_320x480.onnx
INFO: producer: tf2onnx 1.13.0 2c1db5
INFO: opset: 13
INFO: input_name.1: input shape: [1, 3, 320, 480] dtype: float32
INFO: output_name.1: sub shape: [1, 320, 480, 3] dtype: float32

![image](https://user-images.githubusercontent.com/33194443/224526412-7c8ea707-b30a-4bfb-83cd-d2e777dd097c.png)

![image](https://user-images.githubusercontent.com/33194443/224526343-608dbfa5-04e2-4ea4-a3ae-983003565da5.png)

What's Changed
* Fixed out-of-range reference errors for begin and end when executing `Slice` for padding removal after `ConvTranspose` generatio by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/243


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.23...1.7.24

1.7.23

- `Conv`, `Resize`, `ScaleAndTranslate`
- Improved stability of shape estimation when onnxsim is not yet executed.
- `Add`, `Sub`, `Mul`, `Div`, `Mod`
- Improved processing order of parameter replacement process.
- `Pow`
- Improved stability of type estimation when onnxsim is not yet executed.
- `ConvTranspose`
- Improved stability of shape estimation when onnxsim is not yet executed.
- Fixed a bug in parameter replacement process.
- MAXIM
- https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_237/maxim_s-2_dehazing_sots-outdoor_1.onnx

What's Changed
* 1.Improved stability of shape estimation when onnxsim is not yet executed. 2.Improved processing order of parameter replacement process by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/240
* Improved stability of type estimation when onnxsim is not yet executed. `Pow` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/241
* Improved stability of shape estimation when onnxsim is not yet executed and fixed a bug in parameter replacement process. `ConvTranspose` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/242


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.22...1.7.23

1.7.22

- `ReduceMax`, `ReduceMean`, `ReduceMin`, `ReduceProd`
- Improved stability of model transformation when onnxsim is not running.
![image](https://user-images.githubusercontent.com/33194443/224461066-89dd16f3-8f61-4a9d-be5e-298e47beca56.png)
- `Resize`
- Support for `preserve_aspect_ratio` and `antialias`.
- `opset >= 18`
- This is only a provisional response and requires a separate implementation of adjustments to the padding of the boundary values.
- `keep_aspect_ratio_policy == 'not_larger'`
- `keep_aspect_ratio_policy == 'not_smaller'`
- Support for `ScaleAndTranslate`
- MAXIM
- https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_237/maxim_s-2_dehazing_sots-outdoor_1.onnx
- Ref: https://zenn.dev/dskkato/articles/tf2-rust-eager-api
![image](https://user-images.githubusercontent.com/33194443/224466103-1ffa64cf-fe7b-445e-b7fd-b0ef06186cff.png)


What's Changed
* Improved stability of model transformation when onnxsim is not running. `ReduceMax`, `ReduceMean`, `ReduceMin`, `ReduceProd` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/234
* Support for `preserve_aspect_ratio` and `antialias` `Resize`. `opset >= 18` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/236
* Support for `ScaleAndTranslate` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/237


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.21...1.7.22

1.7.21

- `MaxPool`, `AveragePool`
- Solved the problem of incorrect padding depending on the state of `count_include_pad`.
https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_207/isnet_general_use_180x320.onnx.zip
https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_207/isnet_general_use_480x640.zip
![image](https://user-images.githubusercontent.com/33194443/223326332-643fa470-8bfa-41c5-a697-611f37634887.png)
- [[ISNet] MaxPool padding values do not match with ONNX and TF in some patterns 207](https://github.com/PINTO0309/onnx2tf/issues/207)

https://user-images.githubusercontent.com/33194443/223332415-6e5af3fd-f4e9-48f6-80dc-cc036b544368.mp4

What's Changed
* `MaxPool` and `AveragePool` fix for `ceil_mode` by Hyunseok-Kim0 in https://github.com/PINTO0309/onnx2tf/pull/211


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.7.20...1.7.21

Page 42 of 85

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.