AI engineering glossary · Deep learning core

What is focal loss?

Focal loss: A modified cross-entropy that shrinks the loss contribution of examples the model already gets right, multiplying it by (1 - p)^gamma. It focuses training on hard examples and helps when one class hugely outnumbers the others.

Level: advancedTopic: Deep learning core

Focal loss: an example

In fraud detection with 1 fraud in 1,000 transactions, it keeps easy legitimate cases from dominating the gradient.

Related terms

More Deep learning core terms

Where you learn it

Focal loss is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.