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.
MIT License
662
stars
65
forks
source link
Optimization of four consecutive arithmetic operations using scalar values following `Gemm` and `MatMul` #664
Optimization of four consecutive arithmetic operations using scalar values following Gemm and MatMul.
If no change occurs in the shape of the input tensor and the output tensor after the operation, skip the broadcast regardless of whether the previous operation was Gemm or not. It should be effective no matter how many arithmetic operations on scalar values are performed in succession.
1. Content and background
Optimization of four consecutive arithmetic operations using scalar values following
Gemm
andMatMul
.If no change occurs in the shape of the input tensor and the output tensor after the operation, skip the broadcast regardless of whether the previous operation was
Gemm
or not. It should be effective no matter how many arithmetic operations on scalar values are performed in succession.repro_new_onnx_model_v2_2.onnx
repro_new_onnx_model_v2_2.onnx.zipWithout
-b
optionWith
-b 1
optionViT-B-16__openai_partial.onnx
ViT-B-16__openai_partial_cut.onnx.zip2. Summary of corrections
3. Before/After (If there is an operating log that can be used as a reference)
4. Issue number (only if there is a related issue)