<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/neural-structured-learning/blob/v1.4.0/neural_structured_learning/lib/utils.py#L286-L315) |

Selects targeting classes for adversarial attack (classification only).

    nsl.lib.get_target_indices(
        logits, labels, adv_target_config
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `logits` | tensor of shape `[batch_size, num_classes]` and dtype=[`tf.float32`](https://www.tensorflow.org/api_docs/python/tf#float32). |
| `labels` | `int` tensor with a shape of `[batch_size]` containing the ground truth labels. |
| `adv_target_config` | instance of [`nsl.configs.AdvTargetConfig`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/nsl/configs/AdvTargetConfig) specifying the adversarial target configuration. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Tensor of shape `[batch_size]` and dtype=[`tf.int32`](https://www.tensorflow.org/api_docs/python/tf#int32) of indices of targets. ||

<br />