Support for int32 in strided slice operation

15 views
Skip to first unread message

Aakash Tyagi

unread,
Aug 24, 2021, 5:26:09 AMAug 24
to mi...@tensorflow.org
Hello
I am trying to run a quantized tflite model using tflm. I stared with the MNIST example give @https://www.tensorflow.org/lite/performance/post_training_integer_quant

After quantizing it to int8 and trying to run it using tflm I'm getting error that int32 is not supported for strided slice. How do i solve this problem? Any suggestions are welcomed.



sandeep singh

unread,
Aug 30, 2021, 7:02:54 AMAug 30
to SIG Micro, aakas...@iiitd.ac.in, mi...@tensorflow.org
Hi, 

This is correct behaviour as Keras by default sets the dynamic batch size to true.
So, your model input shape is [*,28,28] not [1,28,28] and bez of that during quantization extra layers are added which are  shape, strides slice layers and pack resulting and those operations are always int32 outputs. 

A simple input static shape set should be okay to solve this issue. 

Thanks, 
Sandeep Singh
Reply all
Reply to author
Forward
0 new messages