softmax
Say it “softmax of z”
Turns a vector of any scores into positive numbers that sum to 1 — a probability distribution.
Example
In code
np.exp(z) / np.exp(z).sum()torch.softmax(z, dim=-1)Where you’ll see it in ML
Classifier outputs, attention weights, next-token probabilities.