OpNotImplemented: The following operators are not supported in frontend TFLite: 'BATCH_TO_SPACE_ND', 'TRANSPOSE'

Hello!

I just found about and am a beginner in working with quantization and compiler-level optimization for Deep Learning.

I am attempting to run a model for Super Resolution on an Android device, this is currently taking 1.2 seconds per frame, which is quite too much.

I attempted loading the model using the from_tflite.ipynb provided in the documentation and faced the following error

OpNotImplemented: The following operators are not supported in frontend TFLite: ‘BATCH_TO_SPACE_ND’, ‘TRANSPOSE’

How could I go about this, am I doing something wrong
In case, I want to implement these ops, how would I go about doing so?

Thank you!

Bump, is it possible for someone to maybe reach out on this issue?

Thank you.

TFLite frontend doesn’t support these two ops currently. However, I think you could implement these two ops. BATCH_TO_SPACE_ND is a little difficult than TRANSPOSE. You could implement TRANSPOSE firstly, then BATCH_TO_SPACE_ND.

You could read the tflite.py and try to understand how we implement convolution, after this, you could start to implement. I wrote one blog how I implement tflite frontend from 0 to 1, but unfortunately I wrote it in Chinese.The general suggestion is to start from from_tflite function and read the code.

Thank you so much for the reply!

I’ll probably get down to implementing the same right away!
It would be amazing if you could share the blog post in either case, as it would be a useful resource. I’ll try my best to work with it by using Google Translate.

Thanks again!

Ok. My Chinese blog of this article is here: https://zhuanlan.zhihu.com/p/57147430 Good luck to you and wish Google Translate could work well.:grinning:

@sree_harsha are you looking at adding support to BATCH_TO_SPACE_ND and Transpose ?

Hi all,

Operator ‘Transpose’ has just merged into master branch. :slight_smile:

Best regards,

1 Like