Skip to content

Reordering the channel dimension index for tensors #22

Answered by kraiskil
OCandler asked this question in Q&A
Discussion options

You must be logged in to vote

I don't see an easy solution to this.

There is the ONNX operand DepthToSpace that does this required permutation, but at the last stage only. (And unfortunately this operand is not (yet) implemented in onnx2c...) The computation in your net would still be done in depth-row-column order, so the weights would have to match.

Most, if not all operands defined in ONNX that assign semantics to the dimensions use the depth-row-column ordering. If the input ONNX could define row-column-depth order, onnx2c would of course be (relatively) easily upgraded to match. The bigger part of the work would be to introduce this idea to ONNX. And possibly Tensorflow/Pytorch/... - I did not check, does some fr…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OCandler
Comment options

Answer selected by OCandler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants