SpinTheMic
Pro

Interview practice question

Loss becomes NaN during training

Machine Learning · Deep Learning · Beginner

Your neural network's loss suddenly becomes NaN after a few hundred steps. What do you check?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Learning rate too high.
  • Exploding gradients; add gradient clipping.
  • Bad data: NaN or infinite values, division by zero.
  • Numerical issues: log of zero, FP16 overflow.
  • Check gradient norms and inputs around the failing step.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics