tfm.vision.target_gather.TargetGather

Targer gather for dense object detector.

Methods

__call__

View source

Labels anchors with ground truth inputs.

B: batch_size N: number of groundtruth boxes.

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.

Returns

target An integer Tensor with shape [M] or [B, M]

Raises

ValueError If labels is higher than rank 3.