Onnx2tf

Latest version: v1.21.2

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

Scan your dependencies

Page 1 of 79

2.16.1

- Keras 3.0 will be the default Keras version. You may need to update your script to use Keras 3.0.
- Please refer to the new Keras documentation for Keras 3.0 (https://keras.io/keras_3).
- This pull request is to experimentally verify the upgrade to `TensorFlow==2.16.1`.

What's Changed
* [experimental] tensorflow==2.16.1, Keras 3.0 by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/609


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.19.16...1.20.0

2.13.0rc0

- [[TODO] Verification of operation when upgrading to TensorFlow v1.13.0 348](https://github.com/PINTO0309/onnx2tf/issues/348)

What's Changed
* TF v2.12.0 -> TF v2.13.0-rc0 by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/363


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.11.11...1.12.0

2.12.0rc0

-okv3, --output_keras_v3: Optional[bool]
Output model in Keras (keras_v3) format.

![image](https://user-images.githubusercontent.com/33194443/218926250-5f3b6ecc-c05d-462f-8ceb-8b53c2feb335.png)
![image](https://user-images.githubusercontent.com/33194443/218926343-e750ef5b-61ba-40ca-86c9-a17f9d3561be.png)

What's Changed
* [Experimental / WIP] Generate a miniscule model for each OP only, retain the results of test inference, and propagate to all OPs. STEP.1,2 by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/184
* TF v2.12.0rc0 - 1. `Transpose` now supports 6D tensors. 2. Support for `Atan2`. by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/189
* Support for `keras_v3` format by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/190


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.6.7...1.7.0

1.21.2

- `GatherElements`
- Added automatic error correction.
- [convnext-det.onnx.zip](https://github.com/PINTO0309/onnx2tf/files/15314366/convnext-det.onnx.zip)
![image](https://github.com/PINTO0309/onnx2tf/assets/33194443/fa899d2c-4569-4072-8780-8864b49a88d2)
- [Quantized ConvNext 629](https://github.com/PINTO0309/onnx2tf/issues/629)

What's Changed
* Added automatic error correction for `GatherElements` by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/630


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.21.1...1.21.2

1.21.1

- `Constant`
- Bring `Constant` layers unconnected to the model into the model.
- It is assumed that the `-nuo` option is specified because running `onnxsim` will remove constants from the ONNX file.
- Wrap constants in a `Lambda` layer and force them into the model.
- [toy_with_constant.onnx.zip](https://github.com/PINTO0309/onnx2tf/files/15292126/toy_with_constant.onnx.zip)
- Convert test
bash
onnx2tf -i toy_with_constant.onnx -nuo -cotof

|ONNX|TFLite|
|:-:|:-:|
|![image](https://github.com/PINTO0309/onnx2tf/assets/33194443/ab2260bd-aa41-4522-ad4b-83567d094edf)|![image](https://github.com/PINTO0309/onnx2tf/assets/33194443/7efc5d4d-ec6f-4b16-8d28-b1389a469df7)|

![image](https://github.com/PINTO0309/onnx2tf/assets/33194443/f8d336f0-e99e-4125-b8f1-bed3960aef7e)

- Inference test
python
import tensorflow as tf
import numpy as np
from pprint import pprint

interpreter = tf.lite.Interpreter(model_path="saved_model/toy_with_constant_float32.tflite")
interpreter.allocate_tensors()

input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()

interpreter.set_tensor(
tensor_index=input_details[0]['index'],
value=np.ones(tuple(input_details[0]['shape']), dtype=np.float32)
)
interpreter.invoke()

variable_output = interpreter.get_tensor(output_details[0]['index'])
constant_output = interpreter.get_tensor(output_details[1]['index'])

print("=================")
print("Variable Output:")
pprint(variable_output)
print("=================")
print("Constant Output:")
pprint(constant_output)


=================
Variable Output:
array([[-0.02787317, -0.05505124, 0.05421712, 0.03526559, -0.14131774,
0.0019211 , 0.08399964, 0.00433664, -0.00984338, -0.03370604]],
dtype=float32)
=================
Constant Output:
array([1., 2., 3., 4., 5.], dtype=float32)

- [Constant outputs removed from ONNX during conversion 627](https://github.com/PINTO0309/onnx2tf/issues/627)

1.21.0

- Fix Typo
- Change API parameter names

What's Changed
* Fix Typo by PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/625


**Full Changelog**: https://github.com/PINTO0309/onnx2tf/compare/1.20.10...1.21.0

Page 1 of 79

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.