AxisCommunications / onnx-to-keras

Convert onnx models exported from pytorch to tensorflow keras models with focus on performace and highleve compatibility.
MIT License
25 stars 13 forks source link

Add support for group convolutions #14

Closed xsacha closed 3 years ago

hakanardo commented 3 years ago

Thanx! Please consider adding a test in test_onnx2keras.py aswell.

xsacha commented 3 years ago

I've added a test and converted a few models using this and confirmed it works.

Big warning to anyone planning on using it: Tensorflow Lite still does not support grouped convolutions during quantization. So this cannot run on the camera, unfortunately. It gives a strange error about the filter size being wrong but it's because it ignores the group number. The Tensorflow Lite bug is tracked here: https://github.com/tensorflow/tensorflow/issues/40044

hakanardo commented 3 years ago

This fails for tensorflow==2.3.1 as it does not support grouped convolutions on the CPU, but I suppose it's time to bump the minimal required tensorflow version...