Hello everyone. I’m using in android project tensorflow for 2 years and stuck on GpuDelegate V2.3.0
After this versions(2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0) all versions containt some error on GpuDelegate initizialization.
Failed to apply delegate: TfLiteGpuDelegate Init: MUL: Expected a 3D tensor of shape HxWxC or a 4D tensor of shape 1xHxWxC but got 170x8
here is the link for issue, that last almost 2 years
Maybe that I’m doing something wrong, and something is possible to do with this.
i’m using trained with magenta model converted from pb to tflite
Maybe this is issue of conversion of old pb to tflite, and there is some feature how to finetune for gpu delegate.
Could you try to convert the model from pb file to TFLite using the latest version of TFLiteConverter? The issue could possibly come from version mismatch between TFLiteConverter and the Interpreter you use to run the model.
I tested on all tf converter versions 2.3.0-2.8.0
I have found the solution yesterday, the issue is with tf.math.multiply(weights, var), I replaced with tf.linalg.matmul(weights ,var, transpose_a=True). Looks like something changed in gpu delegate and it can’t multiply now 2d arrays with common mul operation, like in 2.3.0 version.