Skip to content
AI360Xpert

Neural Networks

Batch Norm & Dropout

See how regularization and normalization stabilize training and prevent overfitting by bounding activations and forcing redundancy.

how regularization and normalization stabilize training and prevent overfitting by bounding activations and forcing redundancy.

Stage 1 of 3: 1. Basic Training

Loss
  • Train Loss
  • Test Loss
  • Active Node
  • Dropped Node
Train Loss0.000Train Loss: 0.000
Test Loss0.000Test Loss: 0.000
Epoch0Epoch: 0

Without batch norm or dropout, training can be unstable or overfit easily.

Batch Norm & Dropout

Training deep neural networks is difficult because as parameters update, the distribution of each layer's inputs changes—a phenomenon called internal covariate shift. This can cause activations to grow unbounded, gradients to vanish or explode, and learning to stall.

Additionally, networks with large capacity tend to memorize the training data, failing to generalize to unseen examples (overfitting).

Batch Normalization

Batch Normalization stabilizes training by explicitly re-centering and re-scaling the activations of hidden layers during the forward pass. For each mini-batch, it calculates the mean and variance, normalizes the activations, and then applies a learned scale (γ\gamma) and shift (β\beta). This keeps activations within a healthy range where the gradients of activation functions (like ReLU or Tanh) are most informative.

Dropout

Dropout acts as a regularizer. During training, it randomly zeroes out a fraction of neurons in a layer with a probability pp on each forward pass. This prevents neurons from co-adapting too strongly to specific features of the training data, forcing the network to learn a more robust, redundant representation. During inference (testing), all neurons are kept active, but their outputs are scaled by 1p1 - p to compensate.

Break it on purpose

Without batch norm, using a high learning rate causes the activations to explode and training to become unstable.