Softmax function (source code)

= Softmax function
{wiki}

For logits $z_1,\ldots,z_K$, the softmax probabilities are $p_k=e^{z_k}/\sum_je^{z_j}$.