some of the mediapipe models use optimized layers such as
If I create a model myself, is there a way I can make the tflite converter to use this optimized layer?
Relevant github issue:
06:34AM - 14 Nov 19 UTC
06:11PM - 10 Dec 19 UTC
I'm not sure why mediapipe uses custom op `Convolution2DTransposeBias` in `palm_
Can it be replaced with built-In ops `TRANSPOSE_CONV ` and `ADD`? `TRANSPOSE_CONV ` op was added to TFLite in version [1.9](https://github.com/tensorflow/tensorflow/blob/r1.9/tensorflow/contrib/lite/schema/schema.fbs)
I tried to create Keras model with `Conv2DTranspose` layer and I set `use_bias=True` and `bias_initializer='random_uniform'`.
data = keras.layers.Input(shape=(32, 32, 3))
x = keras.layers.Conv2D(filters=10, kernel_size=(3, 3), strides=(2, 2), padding='same')(data)
x2 = keras.layers.Conv2DTranspose(filters=10, kernel_size=(3, 3), strides=(2, 2), padding='same',
That Keras model can be converted to TFLite model. Keras `Conv2DTranspose` op was mapped to two built-in TFLite operators `TRANSPOSE_CONV` and `ADD`
Resulting TFLite model visualization: (download html and open it): https://www.dropbox.com/s/au39pvmw3fquhm1/conv2d_transpose_bias.tflite.htm?dl=0
Thanks in advance!
Welcome to the Tensorflow Forum!
We can use
custom operators to allow conversion of an unsupported Tensorflow operator in Tensorflow Lite. If the flatbuffer file(.tflite) needs to be edited we can make use of schema and
flatc command which helps us to convert a
.tflite model to an editable
.json can be converted back to