Assume a list with non concatenable objects which needs to be accessed via a look up table. So the list index will be a tensor object but this is not possible.
tf_look_up = tf.constant(np.array([3, 2, 1, 0, 4]))
index = tf.constant(2)
list = [0,1,2,3,4]
target = list[tf_look_up[index]]
This will bring out the following error message.
TypeError: list indices must be integers or slices, not Tensor
Is the a way/workaround to index lists with tensors?