gather x = fluid.layers.data(name='x', shape=[-1, 5], dtype='float32')output = fluid.layers.gather(x, index)