JDAI-CV / DNNLibrary

Daquexian's NNAPI Library. ONNX + Android NNAPI
Apache License 2.0
346 stars 59 forks source link

Operation decomposition should be done in ModelBuilder #44

Open daquexian opened 5 years ago

daquexian commented 5 years ago

Some operations in DNNLibrary are indeed composited by several nnapi operations

e.g., dilated convolution = space to batch -> convolution -> batch to space prelu -> relu + (mul -> relu -> mul).

The decomposition is now done in OnnxConverter, however, many of these operations are supported directly by nnapi in Android Q. As a result, the decomposition should be done in ModelBuilder on-the-fly in order to choose the best interpretation of these ops.