# tf.batch_gather

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/array_ops.py#L3979-L3992) |

Gather slices from params according to indices with leading batch dims. (deprecated)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.batch_gather`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/batch_gather)

<br />

    tf.batch_gather(
        params, indices, name=None
    )

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed after 2017-10-25. Instructions for updating: [`tf.batch_gather`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/batch_gather) is deprecated, please use [`tf.gather`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/gather) with `batch_dims=-1` instead.