In this blog post, I present how to use multi-dimensional index arrays for indexing tensors.

First, I will show multi-dimensional array indexing with numpy. Then I will show two approaches in tensorflow:

- tf.while_loop
- tf.gather_nd

I will conclude that tf.gather_nd is much more effective than tf.while_loop.