0Pricing
Deep Learning Academy · Lektion

Eingaben normalisieren und standardisieren

Skalieren Sie Merkmale, damit das Training konvergiert.

Eingaben normalisieren und standardisieren ist eine kostenlose Deep Learning Academy-Lektion auf CoddyKit. Dies ist Lektion 4 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.

Raw Numbers Slow Learning

Features on wildly different scales, like age and salary, confuse a network. Rescaling them first is why normalization makes training converge faster. ⚖️

Two Common Recipes

You will meet two main scalers: standardization shifts data to mean zero and unit variance, while min-max squeezes it into a fixed range like 0 to 1.

Standardize with Mean and Std

Standardization subtracts the mean and divides by the standard deviation. The result is centered on zero with a spread of one, the deep learning default.

x = (x - x.mean()) / x.std()

Min-Max Scaling

Min-max scaling maps your smallest value to 0 and largest to 1. It is handy when a bounded input range matters, like pixel intensities.

x = (x - x.min()) / (x.max() - x.min())

Fit on Train Only

Compute the mean and std from the training set only. Reusing test data to set these stats leaks information and inflates your scores.

Reuse the Same Stats

Apply the exact training statistics to validation and test data. Both splits must be transformed the same way or your model sees mismatched inputs.

x_val = (x_val - train_mean) / train_std

Per-Channel for Images

For images you normalize each color channel with its own mean and std. PyTorch ships transforms.Normalize to do exactly this in a pipeline.

transforms.Normalize(mean=[0.5], std=[0.5])

Borrow Known ImageNet Stats

When using pretrained vision models, normalize with the ImageNet means and stds they were trained on. Matching those numbers keeps inputs in the expected range.

Do It Inside __getitem__

The cleanest spot to scale is your dataset's __getitem__ or a transform. Then every sample arrives normalized without extra code in your training loop.

Watch for Divide by Zero

If a feature is constant its std is zero and dividing explodes. Add a tiny epsilon to the denominator to keep the math safe and stable.

x = (x - mean) / (std + 1e-8)

Small Step, Big Payoff

Normalizing inputs is a quick preprocessing habit, yet it often unlocks faster, more stable training. Skip it and even a good model may crawl.

Quick Check

From which split should you compute normalization statistics?

Recap

Normalization rescales features so training converges, using stats fit on the training set and reused everywhere, often inside a transform. 🎉

Häufig gestellte Fragen

Ist die Lektion „Eingaben normalisieren und standardisieren“ kostenlos?

Ja — der vollständige Text von „Eingaben normalisieren und standardisieren“ 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 „Eingaben normalisieren und standardisieren“?

Skalieren Sie Merkmale, damit das Training konvergiert. 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 4 von 4.

Wie lange dauert die Lektion „Eingaben normalisieren und standardisieren“?

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

  1. Eine eigene Dataset-Klasse schreiben
  2. Batching, Shuffling und num_workers
  3. collate_fn für Eingaben variabler Länge
  4. Eingaben normalisieren und standardisieren
← Zurück zu Deep Learning Academy