Maths for ML / Notation
softmax(z)i=∑jezjezi softmax
FunctionsBeginnerSay it “softmax of z”
Turns a vector of any scores into positive numbers that sum to 1 — a probability distribution.
Example
softmax([1,1])=[0.5,0.5] 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.
← All 94 symbols