Skip to content

Phase 2 - Training Deep Neural Networks

Why deep nets fight back

A shallow network with one or two hidden layers is forgiving. Stack ten, twenty, or a hundred layers and things change: gradients can vanish or explode on their way back through backpropagation, training can crawl to a halt, and a model with millions of parameters can memorize the training set instead of learning from it.

In this phase, you’ll learn the toolkit that makes deep networks actually trainable:

  • how backpropagation computes gradients, and which optimizer (SGD, momentum, RMSProp, Adam) to reach for
  • why gradients vanish or explode, and how Glorot/He initialization plus nonsaturating activations (ReLU, ELU, SELU) fix it
  • Batch Normalization — letting each layer normalize its own inputs on the fly
  • regularization: L1/L2 penalties, Dropout, MC Dropout, and max-norm
  • learning rate scheduling — decaying the learning rate on a schedule instead of leaving it constant

Phase 2 flow

diagram Diagram mermaid

How the pieces fit together

None of these techniques are used in isolation — a real tf.kerastf.keras training script usually combines several at once: He initialization on every layer, ELU or ReLU activations, a BatchNormalization layer after each Dense layer, a touch of L2 regularization or Dropout, and Adam (or Nadam) as the optimizer with a decaying learning rate. By the end of this phase you’ll understand why each ingredient earns its place in that recipe.

If this helped you, consider buying me a coffee ☕

Buy me a coffee

Was this page helpful?

Let us know how we did