I have two tensors with shapes

`voxels :: (4, 64, 64, 64)
indices :: (4096, 3)`

Here `voxels` has `dtype` `float32`, while `indices` are integers between `0` and `63`.
I would like to index the voxels, creating a tensor tensor `output`:

`output :: 4, 4096`

Such that the following constraint holds

`output[i,j] = voxels[i, indices[j,0], indices[j,1]. indices[j,2]]`

**How can I do this in tensorflow?**

There is some talk of more advanced slicing [here](https://github.com/tensorflow/tensorflow/issues/206), but it's not clear that the suggestions there apply, or that the gradients have been implemented.

For reference, if the above tensors were numpy arrays, the following code does what I want:

`output = voxels[:, indices[:,0],indices[:,1],indices[:,2]]`