Returns the softmax values for x.
The exact formula used is:
S(xi) = e^xi / SUMj(e^xj), where j goes over all elements in x.
- Parameters:
x (ndarray | list) – The input to the softmax function.
axis (int) – The axis along which to softmax.
epsilon (float | None) – Optional epsilon as a minimum value. If None, use
SMALL_NUMBER.
- Returns:
The softmax over x.
- Return type:
ndarray