<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/ops/target_gather.py#L20-L103) |

Targer gather for dense object detector.

## Methods

### `__call__`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/ops/target_gather.py#L23-L49)

    __call__(
        labels, match_indices, mask=None, mask_val=0.0
    )

Labels anchors with ground truth inputs.

B: batch_size
N: number of groundtruth boxes.

<br />

<br />

<br />

| Args ||
|---|---|
| `labels` | An integer tensor with shape \[N, dims\] or \[B, N, ...\] representing groundtruth labels. |
| `match_indices` | An integer tensor with shape \[M\] or \[B, M\] representing match label index. |
| `mask` | An boolean tensor with shape \[M, dims\] or \[B, M,...\] representing match labels. |
| `mask_val` | An integer to fill in for mask. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `target` | An integer Tensor with shape \[M\] or \[B, M\] |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `ValueError` | If `labels` is higher than rank 3. |

<br />