Calibrating a Network with Temperature Scaling

medium
Unit 20 · Inference0/2 to milestone

Modern networks are over-confident. Temperature scaling divides logits by a single scalar T>0T > 0 fitted on a validation set to minimise NLL; accuracy doesn't change because the argmax doesn't.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Calibrating a Network with Temperature Scaling · TechGradify