The job from “Scores into chances”: turn a model’s scores into chances, one per option, that add up to 100%. But now the scores can be huge or very negative, like 1000 or −1000. Write chances(scores) so it never breaks.
Plain softmax takes e to each score, then divides by the total. A float can hold numbers up to about 10³⁰⁸; anything bigger is just “inf”. Watch what that does to a model whose scores are in the thousands.
chances(scores)| scores | one number per option, can be huge or very negative | e.g. [1, 2, 3] |
| returns | one chance per option, adding up to 1 | |