ivy.neural_net_functional.activations.softmax(x, axis=- 1, f=None)[source]

Applies the softmax function element-wise.

  • x (array) – Input array.

  • axis (int, optional) – The dimension softmax would be performed on. The default is -1 which indicates the last dimension.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The input array with softmax applied element-wise.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty