tf.compat.v1.math.softmax

View source on GitHub

Computes softmax activations. (deprecated arguments)

tf.compat.v1.math.softmax(
    logits, axis=None, name=None, dim=None
)

Warning: SOME ARGUMENTS ARE DEPRECATED: (dim). They will be removed in a future version. Instructions for updating: dim is deprecated, use axis instead

This function performs the equivalent of

softmax = tf.exp(logits) / tf.reduce_sum(tf.exp(logits), axis)

See: https://en.wikipedia.org/wiki/Softmax_function

Example usage:

tf.nn.softmax([-1, 0., 1.])

Args:

Returns:

A Tensor. Has the same type and shape as logits.

Raises: