Leggere il divario tra training e validation
Riconosca l'overfitting dalle curve della loss
Leggere il divario tra training e validation è una lezione Deep Learning Academy gratuita su CoddyKit. Questa è la lezione 1 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Deep Learning Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Deep Learning Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
What Overfitting Means
Overfitting happens when your model memorizes the training data instead of learning patterns that work on new, unseen examples. 🧠
Two Curves to Watch
You track two losses: the training loss on data the model learns from, and the validation loss on data it never updates on.
The Train/Val Gap
The gap is the distance between training loss and validation loss. A small gap means your model generalizes well to fresh data.
A Healthy Fit
When both losses fall together and stay close, you have a good fit. The model is learning real structure, not noise.
Spotting Overfitting
Overfitting shows up as training loss still dropping while validation loss flattens or rises. The gap widens.
Spotting Underfitting
If both losses stay high and never improve much, the model is underfitting. It is too simple to capture the patterns.
Why You Need a Val Set
Training accuracy can lie. A separate validation set is your honest signal for how the model behaves on data it has not seen.
Log Both Losses
Record both losses every epoch so you can plot them. The shape of these curves tells you exactly what is going wrong.
train_losses.append(train_loss)
val_losses.append(val_loss)
print(epoch, train_loss, val_loss)The Overfitting Elbow
Watch for the elbow: the epoch where validation loss bottoms out and starts climbing. That is the moment overfitting begins.
More Data Helps
One of the simplest cures for a wide gap is more training data, which makes memorization harder and patterns clearer.
Gap Guides Your Fixes
The size of the gap tells you what to try next: regularize a wide gap, or grow the model when both losses stay high.
Quick Check
Read the curves and tell overfitting apart from a healthy fit.
Recap
You learned to read the train/val gap: close curves mean a good fit, a widening gap means overfitting, and both high means underfitting. 📈
Domande Frequenti
La lezione «Leggere il divario tra training e validation» è gratuita?
Sì — il testo completo di «Leggere il divario tra training e validation» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Deep Learning Academy, passa a CoddyKit PRO. Il corso Deep Learning Academy include 4 lezioni in totale.
Cosa imparerò in «Leggere il divario tra training e validation»?
Riconosca l'overfitting dalle curve della loss Eserciti Deep Learning Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare Deep Learning Academy?
Non è richiesta alcuna esperienza precedente. Deep Learning Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 1 di 4.
Quanto tempo richiede la lezione «Leggere il divario tra training e validation»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione Deep Learning Academy?
Sì. Ogni lezione Deep Learning Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Leggere il divario tra training e validation
- Dropout: eliminare neuroni casualmente
- Batch norm e layer norm
- Data augmentation come dati gratuiti