# tf.contrib.layers.softmax

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/layers/python/layers/layers.py#L2888-L2910) |

Performs softmax on Nth dimension of N-dimensional logit tensor.

    tf.contrib.layers.softmax(
        logits, scope=None
    )

For two-dimensional logits this reduces to tf.nn.softmax. The N-th dimension
needs to have a specified number of elements (number of classes).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `logits` | N-dimensional `Tensor` with logits, where N \> 1. |
| `scope` | Optional scope for variable_scope. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` with same shape and type as logits. ||

<br />