Gradienten zeigen bergauf – gehen Sie also andersherum
Die Steigung nutzen, um Gewichte zu verbessern.
Gradienten zeigen bergauf – gehen Sie also andersherum ist eine kostenlose Deep Learning Academy-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Deep Learning Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Deep Learning Academy-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Reading the Slope
To walk downhill you first need to know which way is down. The gradient is the tool that tells you the slope of the loss at your current spot.
Gradient Points Uphill
Here is the surprise: the gradient points in the direction where loss increases fastest. It shows you the steepest way up, not down.
So Step the Other Way
Since the gradient aims uphill, you move in the opposite direction to go down. Subtracting the gradient takes you toward lower loss.
w = w - gradThe Update Rule
This one line is the heart of training. You scale the gradient by a small step size, then subtract it from each weight. Repeat and loss drops.
w = w - lr * gradGradient Is a Vector
With many weights, the gradient is a whole vector: one slope per weight. Each weight gets nudged by its own piece of that vector.
Magnitude Means Steepness
A large gradient value means the loss is very steep in that direction, so that weight needs a bigger correction. Small values mean you are nearly flat there.
Where Gradient Is Zero
At the very bottom of a valley the slope flattens and the gradient becomes zero. With nothing to subtract, the weights stop moving. You have converged.
One Step at a Time
You almost never reach the bottom in one jump. Each step only improves things a little, so descent is a long series of tiny downhill moves.
Following the Negative Gradient
The path you trace by always heading along the negative gradient is the route of steepest descent. It is the greedy shortcut toward lower loss.
step = -gradWhy Subtraction Works
Subtracting moves you against the increase, so loss must fall for a small enough step. That simple sign flip is what turns a slope into progress.
Toward Automatic Gradients
You will rarely compute these slopes by hand. PyTorch's autograd finds the gradient for you, but the rule stays the same: subtract it to descend.
Quick Check
Which direction does the gradient point?
Recap
The gradient points uphill toward higher loss, so you subtract a scaled version of it to step down. Repeat that update and the model rolls toward the valley. ⬇️
Häufig gestellte Fragen
Ist die Lektion „Gradienten zeigen bergauf – gehen Sie also andersherum“ kostenlos?
Ja — der vollständige Text von „Gradienten zeigen bergauf – gehen Sie also andersherum“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Deep Learning Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Deep Learning Academy-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Gradienten zeigen bergauf – gehen Sie also andersherum“?
Die Steigung nutzen, um Gewichte zu verbessern. Du übst Deep Learning Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Deep Learning Academy zu starten?
Keine Vorkenntnisse erforderlich. Deep Learning Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.
Wie lange dauert die Lektion „Gradienten zeigen bergauf – gehen Sie also andersherum“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Deep Learning Academy-Lektion Code schreiben und ausführen?
Ja. Jede Deep Learning Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Der Loss als Landschaft, die es hinabzusteigen gilt
- Gradienten zeigen bergauf – gehen Sie also andersherum
- Lernrate: Zu groß, zu klein, genau richtig
- Eine Funktion von Hand in Python minimieren