Unique tool to convert ONNX files (NCHW) to TensorFlow format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
Project description
[WIP] onnx2tf
Self-Created Tools to convert ONNX files (NCHW) to TensorFlow format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
Key concept
- onnx-tensorflow is a very useful tool, but the performance of the generated TensorFlow models is significantly degraded due to the extrapolation of a large number of
Transpose
OPs before and after each OP during the format conversion fromNCHW
toNHWC
. Therefore, I will make this tool myself as a derivative tool of onnx-tensorflow without extrapolatingTranspose
. - Not only does it handle conversions of 4-dimensional inputs, such as
NCHW
toNHWC
, but also the number of input dimensions in 3, 5, or even more dimensions. For example,NCDHW
toNDHWC
, etc. However, since 1-D, 2-D, 3-D and 6-D input may produce patterns that are mechanically difficult to convert, it should be possible to give parameters to externally modify the tool's behavior. - Support conversion to TensorFlow saved model and TFLite (Float32/Float16).
- Does not support quantization to INT8. For quantization, use the official TensorFlow converter to convert from saved_model to your own.
- Files exceeding the Protocol Buffers file size limit of 2GB are not supported. Therefore, the external format is not supported at the initial stage of tool creation.
- If there are ONNX OPs that are not supported by TensorFlow, use simple-onnx-processing-tools to replace them with harmless OPs in advance and then use this tool to convert them. In other words, you can convert any model with your efforts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onnx2tf-0.0.1.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file onnx2tf-0.0.1.tar.gz
.
File metadata
- Download URL: onnx2tf-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de51f9bc5a38724a17c7119042b2601a6420c7535cfc8f0e9bb9d8208e3f1c49 |
|
MD5 | 470fdff70dd407481e34100cfde7eebb |
|
BLAKE2b-256 | cfb8424956587fa1cdee863403efc28329d0769092543597a4750e89d2b6fab3 |
File details
Details for the file onnx2tf-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: onnx2tf-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e82154aa5715f49b2c8125bda47b440bea36712582b44558308951cf1f568c2c |
|
MD5 | 0fe7a9e01c10a1ea0af8dcf272467358 |
|
BLAKE2b-256 | 6247758b8d525fe62a49b04ec217d9627e1087ff4f28363e6203f239fc143672 |