PINTO0309 / onnx2tf

Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf). I don't need a Star, but give me a pull request.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to convert onnx(NCHW) to NHWC(without adding transpose) and write back to onnx file

abhishek27m1992github opened this issue · comments

Issue Type

Feature Request

OS

Others

onnx2tf version number

na

onnx version number

na

onnxruntime version number

na

onnxsim (onnx_simplifier) version number

na

tensorflow version number

na

Download URL for ONNX

NA

Parameter Replacement JSON

NA

Description

We already developed out NN Accelerator which takes input .tflite & .onnx files in NHWC format.

https://github.com/PINTO0309/simple-onnx-processing-tools

As per tools mentioned in above link, we tried scc4onnx.
scc4onnx: as shown in example it adds transpose as an extra layer in order to convert to NHWC but it brings extra overhead to H/W performance. i want the output without transpose layer similar like onnx2tf tool. So the other way is to change/reshuffle the weight matrix in memory . Can your onnx2tf tool write the data into onnx in NHWC format or any tool without adding transpose layer ?

Thanks for your help.