tf.Gather indices type mismatch with tfl.gather?

Hi there!

I’m converting a model written in keras/tf to tflite, which uses the tf.gather operator. I’m getting the following error when trying to pass the indices operand as an uint32 tensor:

TypeError: Value passed to parameter 'indices' has DataType uint32 not in list of allowed values: int16, int32, int64

However I see that for tflite this operand is signless: 'tfl' Dialect  |  TensorFlow MLIR

I wonder where this mismatch comes from? And is it possible to force passing an uint32?

Thanks in advance!

Hi @SiCong_Li, As the indices argument supports a tensor of 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values datatypes it is not possible to pass other dtypes. Thank You.

1 Like

Thanks Kiran! This was a mistake from my side.