Mathematics for AI · intermediate
Softmax and Cross-Entropy Without NaNs: The Log-Sum-Exp Trick
Why naive softmax turns your loss into NaN, how subtracting the max fixes it, and how to write a cross-entropy loss that can't blow up.
THE INFERENCEAI BLOG
Tutorials, roadmaps and career guides for university students in the US, UK, Canada, Europe and beyond. Every guide explains the idea, shows tested Python code, and links to a problem you can solve.
Mathematics for AI · intermediate
Why naive softmax turns your loss into NaN, how subtracting the max fixes it, and how to write a cross-entropy loss that can't blow up.
Mathematics for AI · beginner
A practical route through vectors, probability, optimization, and statistics for modern AI engineering.