Neural Network Training
Training Neural Networks: Core Techniques and Practical Guidance
Training a neural network involves more than defining layers and applying gradient descent. The network must be initialized carefully, supplied with appropriately processed data, monitored during optimization, and tuned through systematic hyperparameter search.
The overall training process is:
Sample a mini-batch of training data.
Forward-propagate the batch through the computational graph.
Compute the loss.
Backpropagate through the network to calculate parameter gradients.
Update the weights and biases using the gradients.
Monitor training behavior and adjust hyperparameters when necessary.
This procedure is commonly called mini-batch stochastic gradient descent.
Neural Networks as Computational Graphs
A neural network can be represented as a computational graph, in which:
Nodes represent mathematical operations or intermediate values.
Edges represent the flow of data and gradients.
Linear or convolutional layers transform the input.
Activation functions introduce nonlinearities.
The final output is used to compute a loss.
A typical layer applies a linear transformation followed by an activation function:
where:
x is the input,
W is a weight matrix or convolutional filter,
b is a bias,
ϕ is an activation function,
f is the layer output.
Convolutional layers
In a convolutional neural network, a filter slides across spatial positions in the input. At each position, it computes a weighted combination of the local input values.
Each filter produces one activation map.
A layer can contain many filters.
The spatial dimensions are generally preserved or systematically changed according to padding and stride.
The output depth equals the number of filters in the layer.
The network learns the filter values and other parameters by minimizing a loss function.
Optimization and the Loss Landscape
The parameters of a neural network define a point in a high-dimensional loss landscape. Training attempts to move the parameters toward regions of low loss.
The gradient indicates the direction of greatest increase in loss. Therefore, optimization updates parameters in the opposite direction:
where:
L is the loss,
η is the learning rate,
∂W∂L is the gradient with respect to the weights.
A successful training process requires gradients that are neither too small nor too large. Activation functions, initialization, normalization, and learning-rate selection all affect gradient flow.
Activation Functions
An activation function, also called a nonlinearity, is applied after a linear or convolutional transformation. Without nonlinearities, stacking multiple linear layers would still produce only one overall linear transformation. Nonlinear activations allow neural networks to represent complex functions.
The major activation functions discussed are:
Sigmoid
Hyperbolic tangent
ReLU
Leaky ReLU
Parametric ReLU
Exponential Linear Unit
Maxout
Sigmoid
The sigmoid function is:
It is applied elementwise and maps any real-valued input to the interval (0,1).
Behavior
Very negative inputs produce outputs close to 0.
Inputs near 0 produce outputs in the approximately linear region.
Very positive inputs produce outputs close to 1.
The function historically received a biological interpretation as a saturating firing rate, because its output resembles a quantity bounded between zero and one.
Problem 1: Saturation kills gradients
During backpropagation, the gradient through a sigmoid node is obtained using the chain rule:
When x is very negative or very positive, the sigmoid curve is nearly flat. Therefore:
The local gradient then nearly eliminates the upstream gradient. This creates the vanishing-gradient problem.
At x=−10, the sigmoid is saturated near zero, so the gradient is nearly zero.
At x=0, the sigmoid is in its useful central region, so the gradient is reasonable.
At x=10, the sigmoid is saturated near one, so the gradient is again nearly zero.
Deep networks containing many saturated sigmoid units can therefore receive extremely small gradients during backpropagation.
Problem 2: Outputs are not zero-centered
Sigmoid outputs are always positive. This can create inefficient parameter updates.
Consider a neuron receiving positive inputs:
For a particular weight wi, the local derivative is:
If every xi is positive, then the gradient with respect to each weight has the sign of the upstream gradient:
Thus, all weight gradients are either positive or negative together. A parameter update must move all weights in a coordinated direction rather than moving different weights independently.
In a two-dimensional weight space, this restricts updates to directions in which both coordinates have the same sign. The optimizer may need to take a zig-zag sequence of steps to reach the optimum instead of moving directly toward it.
This is one reason why zero-centered data is desirable.
Problem 3: Computational cost
The sigmoid requires evaluating an exponential, making it more expensive than simple piecewise-linear functions such as ReLU. This is usually a minor issue compared with the cost of matrix multiplications and convolutions, but it is still a disadvantage.
Practical conclusion
Sigmoid is generally avoided in hidden layers because of:
Saturation and vanishing gradients.
Non-zero-centered outputs.
Greater computational cost.
It remains useful in some output layers, especially when representing probabilities for binary outcomes.
Hyperbolic Tangent
The hyperbolic tangent function maps inputs to approximately the interval (−1,1):
Compared with sigmoid, tanh is zero-centered.
Advantages over sigmoid
Outputs can be positive or negative.
The zero-centered output produces more balanced gradient directions.
It is often easier to optimize than sigmoid.
Remaining problem: Saturation
Tanh still saturates for large positive and negative inputs:
Large positive inputs approach 1.
Large negative inputs approach −1.
The derivative becomes nearly zero in both regions.
Thus, tanh still suffers from vanishing gradients when its inputs have large magnitude.
Practical conclusion
Tanh is generally better than sigmoid for hidden layers, but ReLU and its variants are usually preferred in modern networks.
Rectified Linear Unit
The ReLU function is:
It is applied elementwise.
Behavior
If x<0, the output is 0.
If x>0, the output is x.
In the positive region, ReLU acts as the identity function.
Advantages
No positive-side saturation
For positive inputs, ReLU has a constant derivative:
Therefore, positive activations can transmit gradients effectively through many layers.
Computational efficiency
ReLU requires only a comparison with zero, making it substantially cheaper than sigmoid or tanh.
Faster convergence
In practice, networks using ReLU often converge much faster than networks using sigmoid or tanh. The lecture describes convergence as roughly six times faster in comparable settings.
Biological plausibility
The response of ReLU-like units is considered a closer approximation to some observed neural responses than the sigmoid function.
Problems with ReLU
ReLU is not zero-centered
ReLU outputs are never negative. Consequently, the same type of gradient-direction inefficiency associated with positive inputs can occur.
Negative inputs have zero gradient
For x<0:
At x=0, the derivative is technically undefined. Implementations conventionally assign a derivative of zero or choose a subgradient.
For example:
At x=−10, the gradient is zero.
At x=10, the gradient is one.
At x=0, the derivative is treated practically as zero.
Dying ReLUs
A dead ReLU is a unit that outputs zero for every training example. Since its gradient is also zero, it stops updating and may never become active again.
A ReLU can be dead when its activation region lies entirely outside the training-data distribution. In a two-dimensional example, a ReLU is active on one half of the input space and inactive on the other. If the dividing hyperplane places all training data in the inactive half, the unit will never receive a useful gradient.
Common causes include:
Unfortunate initialization: The weights initially place the ReLU’s active region away from the data.
Excessively large learning rate: A formerly useful unit can be moved outside the data region by a large update.
The lecture notes that approximately 10% to 20% of ReLU units may be dead in some trained networks, although such networks can still perform well.
Positive bias initialization
Some practitioners initialize ReLU biases to slightly positive values. This increases the chance that units are active at the beginning of training and can receive gradients.
However:
Some experiments report benefits.
Other experiments find little or no improvement.
Zero bias initialization remains common.
Leaky ReLU
A leaky ReLU gives the negative region a small nonzero slope:
where α is a small positive constant.
Advantages
The negative region no longer has zero gradient.
Units are less likely to die permanently.
The function remains computationally efficient.
It does not saturate in the negative region.
It generally retains the fast-convergence benefits of ReLU.
Parametric ReLU
A parametric ReLU, or PReLU, is similar to leaky ReLU, except that the negative slope is learned:
Here, α is a trainable parameter rather than a fixed constant.
Main benefit
PReLU offers greater flexibility because the network can learn the appropriate negative-region slope instead of relying on a manually selected value. Depending on the implementation, the parameter may be shared or specified separately for different units or channels.
Exponential Linear Unit
The Exponential Linear Unit, or ELU, retains the linear positive region but uses a smooth negative region that saturates at a negative value. A common form is:
Properties
It behaves like ReLU for positive inputs.
Its negative outputs make the mean closer to zero.
Its negative region saturates, unlike leaky ReLU.
The negative saturation may provide robustness to noise and useful deactivation states.
ELU can be viewed as a compromise between ReLU-like behavior and the negative saturation of tanh-like functions.
Maxout
A Maxout unit does not apply a single fixed elementwise nonlinearity to one dot product. Instead, it takes the maximum of multiple affine functions:
Advantages
Maxout generalizes ReLU and leaky ReLU.
It operates in piecewise-linear regions.
It does not saturate in the same way as sigmoid or tanh.
It avoids the standard dying-ReLU behavior.
Disadvantage
Each unit requires multiple sets of weights and biases. With two affine functions, the number of parameters per unit is approximately doubled.
Practical Choice of Activation Function
A useful general guideline is:
Use ReLU as the default hidden-layer activation.
Try leaky ReLU, ELU, PReLU, or Maxout when ReLU performs poorly.
Tanh may still be useful in some settings.
Avoid sigmoid in hidden layers unless there is a specific reason to use it.
Activation functions should ultimately be evaluated empirically, because the best choice can depend on the architecture, optimization method, and dataset.
Data Preprocessing
Data preprocessing transforms the input into a form that makes optimization more effective.
The two standard operations are:
Zero-centering.
Scaling or normalization.
Zero-Centering
For each feature, the empirical mean is subtracted:
where μ is estimated from the training data.
Why zero-centering helps
If inputs are all positive or all negative, gradients may tend to have the same sign across many parameters. This restricts the directions available to the optimizer and produces inefficient updates.
Zero-centered inputs contain both positive and negative values, allowing different weights to receive gradients with different signs.
Zero-centering is especially helpful for the first layer of a network. However, it does not solve non-zero-centered activations throughout a deep network, because later layers can still produce shifted activation distributions.
Normalization by Standard Deviation
A feature can also be scaled by its standard deviation:
where σ is the empirical standard deviation.
This places features on comparable scales so that no feature dominates optimization merely because it has larger numerical values.
Why normalization helps
If one feature varies over a much larger numerical range than another, it may contribute disproportionately to:
Dot products.
Gradients.
Parameter updates.
The geometry of the optimization problem.
Scaling features to comparable ranges allows them to contribute more evenly.
Image preprocessing
For images, zero-centering is commonly used, but full normalization is not always necessary.
Image pixels at corresponding locations often have reasonably comparable scales and distributions. Therefore, image-based neural networks frequently use:
Mean subtraction.
No additional per-pixel standard-deviation normalization.
No PCA or whitening.
The spatial structure of the original image is generally preserved because convolutional networks are designed to exploit spatial relationships directly.
Mean image subtraction
For an image dataset, the training set can be used to compute a mean image with the same dimensions as each input image.
For images of dimensions 32×32×3, the mean image also has dimensions 32×32×3.
Each input image is transformed as:
where μimage is computed by averaging corresponding pixel values over the training images.
The mean is normally computed once before training begins, not separately for each mini-batch.
Per-channel mean subtraction
Instead of computing a separate mean for every pixel location, a network may compute one mean for each color channel.
For RGB images, this produces:
One mean for the red channel.
One mean for the green channel.
One mean for the blue channel.
This is simpler and often works nearly as well because the average values within each channel may be sufficiently similar across spatial locations.
Applying preprocessing to test data
The preprocessing transformation must be identical during training and testing.
The mean and standard deviation are estimated from the training data only. The same values are then applied to:
Training examples.
Validation examples.
Test examples.
The test set must not be used to estimate preprocessing statistics, because doing so would leak information from the test data into the model-development process.
Weight Initialization
A neural network cannot begin training until its weights and biases have initial values. Initialization must break symmetry while preserving useful activation and gradient magnitudes.
Why zero initialization fails
Suppose every weight is initialized to zero:
All neurons in a layer then perform exactly the same computation. They produce identical outputs and receive identical gradients. Consequently, they remain identical after every update.
This is called a symmetry problem.
The network needs different neurons to learn different features. Identical initialization prevents this specialization.
Zero initialization does not necessarily mean that every neuron is immediately “dead.” The central problem is that all neurons behave identically and receive the same updates.
Small random initialization
A basic improvement is to initialize weights using small random values, for example:
This breaks symmetry because different neurons begin with different weights.
Small random initialization can work for shallow networks, but it often fails in deep networks.
Very small weights: vanishing activations and gradients
Consider a deep network whose layers repeatedly multiply by small weight matrices. During the forward pass, activations may shrink toward zero:
If the entries of each Wl are small, repeated multiplication causes the activation magnitudes to collapse.
Consequences include:
Later-layer activations approach zero.
Gradients with respect to weights become small.
Parameters stop updating effectively.
Gradients flowing backward through many layers also collapse.
For a linear operation, the gradient with respect to a weight includes the input activation:
If x is close to zero, the weight gradient is also close to zero.
During backpropagation, gradients are repeatedly multiplied by weight matrices. If these matrices are small, the gradients become progressively smaller, producing vanishing gradients.
Very large weights: saturation
Increasing the weight scale does not solve the problem. If weights are too large, pre-activation values become very positive or very negative.
For tanh, this pushes activations toward:
These are saturated regions where the derivative is nearly zero. The result is again:
Vanishing gradients.
Nearly constant activations.
Little or no parameter learning.
Thus, initialization must avoid both extremes:
Too small: activations and gradients collapse toward zero.
Too large: nonlinearities saturate and gradients disappear.
Xavier initialization
Xavier initialization, also called Glorot initialization, chooses the weight scale based on the number of inputs to a neuron.
A common form is:
or equivalently:
depending on the specific version being used.
The goal is to preserve the variance of activations across layers:
Intuition
If a neuron has few inputs, each weight can be relatively larger.
If a neuron has many inputs, each weight should be smaller.
The scaling prevents repeated multiplication from shrinking or excessively enlarging the activation distribution.
Xavier initialization is derived under assumptions such as approximately linear activations and a balanced distribution of inputs.
Adjusting initialization for ReLU
ReLU sets approximately half of its inputs to zero when the pre-activation distribution is symmetric around zero. Therefore, it reduces the activation variance by roughly half.
Using a standard Xavier-style initialization without accounting for this effect can cause activations to progressively shrink in deep ReLU networks.
A ReLU-specific adjustment increases the variance of the weights to compensate for the approximately half of activations that are removed. A commonly used form is He initialization:
This helps preserve activation variance through ReLU layers.
Practical guideline
Xavier initialization is a useful starting point, especially for approximately linear or tanh-like activations.
ReLU networks generally benefit from ReLU-aware initialization such as He initialization.
Initialization remains an active research area because it strongly affects whether a network trains successfully.
Batch Normalization
Batch normalization directly controls the distribution of activations during training.
Rather than relying only on weight initialization to produce suitable activations, batch normalization normalizes intermediate activations on every forward pass.
Basic operation
For a mini-batch of activations, the batch mean and variance are computed:
The activation is normalized:
where ϵ is a small constant added for numerical stability.
The normalized value is then scaled and shifted:
where:
γ is a learned scale parameter.
β is a learned shift parameter.
The entire operation is differentiable, so gradients can be backpropagated through it.
Why batch normalization helps
Batch normalization can:
Improve gradient flow.
Reduce sensitivity to initialization.
Allow training over a wider range of learning rates.
Make optimization more robust.
Reduce the likelihood of activations becoming too large or too small.
It is generally inserted after fully connected or convolutional layers, often before or near the activation function depending on the architecture.
Fully connected layers
For a fully connected layer, normalization is generally performed independently for each feature or neuron across the examples in the mini-batch.
If the batch has N examples and each example has D features, the mean and variance are computed across the N examples separately for each of the D dimensions.
Convolutional layers
Convolutional layers have spatial dimensions and multiple activation maps. Batch normalization must preserve the convolutional structure.
For convolutional activations, normalization is typically performed jointly over:
The examples in the mini-batch.
The spatial locations in an activation map.
A separate mean and variance are generally used for each activation map or channel.
This ensures that all spatial locations within the same feature map are normalized consistently, which respects the shared-weights property of convolution.
The purpose of γ and β
Pure normalization forces activations toward zero mean and unit variance. This may be helpful, but it can also be too restrictive.
For example, forcing every input to a tanh function into a unit-scale distribution may constrain the network to a particular degree of saturation. Some amount of saturation might be useful in a particular layer.
The learned parameters γ and β restore flexibility:
γ controls the scale.
β controls the shift.
The network can choose how strongly to normalize each feature.
In principle, the layer can learn parameters that reproduce the original transformation, including an identity mapping. This does not make batch normalization useless; it simply gives the network the option to reduce or remove normalization if that is beneficial.
Batch normalization as regularization
Batch normalization also has a regularizing effect.
A training example’s normalized representation depends not only on that example but also on the other examples in the same mini-batch. Therefore, the same example may produce slightly different intermediate values when paired with different batch members.
This introduces small fluctuations or “jitter” into the representation and can reduce overfitting.
The regularization effect is a consequence of using batch statistics during training, not the primary definition of batch normalization.
Training and test behavior
During training, batch statistics are computed from the current mini-batch.
At test time, the model generally does not compute statistics from the current test batch. Instead, it uses estimates collected during training, often through running averages:
Running mean.
Running variance.
This ensures that test-time predictions are stable and do not depend on which other examples happen to be processed alongside a particular input.
Small-batch considerations
Batch normalization works particularly well for standard convolutional networks with reasonably sized batches. With very small batches, estimates of the mean and variance become less accurate.
Alternative normalization methods may be more appropriate for:
Reinforcement learning.
Recurrent networks.
Very small batch sizes.
Settings where examples are not naturally grouped into batches.
Babysitting the Learning Process
Training should be actively monitored rather than run blindly. Loss curves, accuracies, gradients, and parameter updates provide diagnostic information about whether the network is learning correctly.
Step 1: Preprocess the data
The first step is to apply the chosen preprocessing transformation, typically mean subtraction for image data.
The statistics must be estimated from the training set and applied consistently to all splits.
Step 2: Choose an initial architecture
An initial experiment might use a simple network, such as:
One hidden layer.
A modest number of hidden units.
A standard activation function.
A simple loss and optimization method.
The architecture can later be expanded or modified.
Step 3: Check the initial loss
Before training, perform a forward pass with the randomly initialized model.
For a Softmax classifier with K classes and small weights, the predicted probabilities should be approximately uniform:
The negative log-likelihood loss should therefore be approximately:
For K=10 classes:
A substantially different initial loss may indicate:
An implementation error.
Incorrect labels.
A numerical problem.
An inappropriate initialization.
A mistake in the loss calculation.
Step 4: Check regularization
Initially disable regularization and verify that the data loss is reasonable.
Then enable regularization. The total loss should increase because it now includes an additional penalty term.
If regularization is represented by a parameter penalty, the total objective has the form:
where λ is the regularization strength.
This comparison helps verify that the regularization term is implemented correctly.
Step 5: Overfit a tiny dataset
Before training on the full dataset, use a very small subset and disable regularization.
A sufficiently expressive network should be able to memorize this small dataset:
Training loss should approach zero.
Training accuracy should approach 100%.
If the network cannot overfit a tiny dataset, something is likely wrong with:
The forward pass.
The loss function.
Backpropagation.
The parameter-update rule.
The labels.
The data pipeline.
The learning rate.
This is one of the most important debugging tests for a neural network implementation.
Understanding loss and accuracy
Loss and accuracy measure different things.
A Softmax model may slightly increase the probability assigned to the correct class without making the probability distribution sharply concentrated. The loss may therefore change only modestly.
Accuracy, however, depends only on which class has the largest predicted probability. A small shift can change the winning class and produce a large jump in accuracy even when the loss remains diffuse.
Thus, loss and accuracy can behave differently, especially early in training.
Learning-Rate Selection
The learning rate is one of the most important hyperparameters.
If it is too small, learning is extremely slow.
If it is too large, updates may overshoot good regions or cause numerical explosions.
A suitable learning rate produces rapid but stable improvement.
Signs of a learning rate that is too small
A learning rate is probably too small when:
The loss barely changes.
The loss curve is nearly flat.
Accuracy improves very slowly.
Weight updates are too small to have a meaningful effect.
Signs of a learning rate that is too large
A learning rate is probably too large when:
The loss becomes
NaN.The loss grows rapidly.
The optimization oscillates.
The loss decreases sharply and then plateaus because updates overshoot useful regions.
The model fails to settle near a good solution.
A NaN loss often indicates that the cost has exploded because parameter updates became excessively large.
Practical search range
For many basic neural-network experiments, a rough learning-rate search may cover several orders of magnitude, such as:
The appropriate range depends on the optimizer, architecture, loss, initialization, normalization, and data scale.
Hyperparameter Optimization
Hyperparameters are values chosen by the practitioner rather than learned directly through backpropagation.
Examples include:
Learning rate.
Learning-rate decay schedule.
Regularization strength.
Update rule.
Number of hidden units.
Network depth.
Activation function.
Batch size.
Initialization method.
Cross-validation
Hyperparameter selection is commonly performed using a validation set.
The process is:
Train a model using a candidate hyperparameter configuration.
Evaluate it on the training set.
Evaluate it on the validation set.
Compare validation performance across configurations.
Select promising values for further testing.
The test set should be reserved for final evaluation rather than repeatedly used during tuning.
Coarse-to-fine search
A practical strategy is to search in stages.
Stage 1: Coarse search
Select values that are widely separated.
Train each model for only a few epochs.
Eliminate values that clearly produce
NaNlosses or no learning.Identify a promising region.
Stage 2: Fine search
Narrow the search interval around promising values.
Use more closely spaced values.
Train for longer.
Compare the resulting validation performance more carefully.
Short runs are useful for quickly detecting obviously bad configurations.
Early detection of exploding losses
A training loop can monitor the loss during each run. If the loss becomes much larger than its initial value, the configuration can be stopped early.
For example, if the current loss becomes several times larger than the initial loss, the run is likely unstable and can be terminated.
This saves computational time during hyperparameter search.
Search in logarithmic space
Learning rates and regularization strengths are multiplicative quantities. Therefore, they should generally be sampled in log space rather than uniformly in ordinary numerical space.
Instead of uniformly sampling η directly, one can sample an exponent a and use:
This treats values such as 10−5, 10−4, and 10−3 as meaningfully separated by multiplicative factors.
Logarithmic sampling is more appropriate because changing a learning rate by a factor of ten is often more significant than changing it by a fixed additive amount.
Interpreting the location of good values
If the best values are consistently found at the edge of the search range, the range is probably incomplete.
For example, if the smallest tested learning rates perform best, even smaller values may work better. The search should be extended in that direction.
A useful search range should contain the good values somewhere in its interior rather than only at one boundary.
Random search versus grid search
A grid search tests fixed combinations of hyperparameter values. For example, it might test every combination of several learning rates and regularization strengths.
Random search samples configurations randomly from the selected ranges.
Random search is often more efficient because hyperparameter performance frequently depends strongly on only a few dimensions. If one hyperparameter is much more important than another, a grid wastes many trials repeating similar values of the important parameter.
Random sampling produces more distinct values for each important hyperparameter and is therefore more likely to discover useful regions.
Diagnosing Training Curves
Loss and accuracy curves reveal common training problems.
Exploding loss
An exploding loss generally indicates:
Learning rate is too high.
Initialization is unstable.
Numerical overflow is occurring.
Gradients or activations are becoming excessively large.
Nearly flat loss
A nearly flat loss can indicate:
Learning rate is too small.
Gradients are vanishing.
Weights were initialized too small.
Activations are dead or saturated.
The implementation is not propagating gradients correctly.
Steep decrease followed by a plateau
A curve that drops sharply and then stops improving may indicate that the learning rate is too large. The updates make large jumps and may repeatedly overshoot a useful local region.
A good learning rate often produces:
A relatively steep initial decrease.
Continued improvement after the initial drop.
A gradual approach toward a lower loss.
Flat period followed by sudden learning
If the loss remains flat for a while and then begins decreasing, possible explanations include:
Poor initialization.
Weak initial gradient flow.
A unit or layer eventually moving into a more useful activation region.
A delayed escape from an unfavorable parameter configuration.
This pattern is a signal to inspect initialization, activation distributions, and gradients.
Diagnosing Generalization
Training and validation performance should be compared.
Large training–validation gap
If training accuracy is much higher than validation accuracy, the model is likely overfitting.
Possible responses include:
Increase regularization strength.
Add data augmentation.
Reduce model capacity.
Use dropout or another regularization technique.
Obtain more training data.
Little or no gap
If training and validation accuracy are both low and similar, the model may be underfitting.
Possible responses include:
Increase the number of hidden units.
Increase network depth.
Use a more expressive architecture.
Reduce excessive regularization.
Train for longer.
A lack of a generalization gap may indicate that the model still has unused capacity.
Monitoring Weight Updates
The size of parameter updates should be compared with the size of the parameters themselves.
A useful diagnostic quantity is:
where:
ΔW is the update applied to the weights.
∥W∥ is the norm of the current weights.
∥ΔW∥ is the norm of the update.
A rough target is often around:
The exact ideal value varies considerably, so this is not a strict requirement.
If the ratio is too large, updates may dominate the current parameters and destabilize training.
If the ratio is too small, learning may be too slow or ineffective.
A moderate ratio suggests that updates are changing the parameters without overwhelming them.
Key Practical Guidelines
Use ReLU as the default hidden-layer activation.
Use leaky ReLU, ELU, PReLU, or Maxout when standard ReLU causes problems.
Avoid sigmoid in hidden layers because of saturation, non-zero-centered outputs, and vanishing gradients.
Subtract the training-set mean from input data.
Apply exactly the same preprocessing statistics to validation and test data.
Normalize features when their scales differ substantially.
Break symmetry with random initialization.
Do not initialize all weights to zero.
Use Xavier-style initialization for suitable activations and ReLU-aware initialization such as He initialization for ReLU networks.
Use batch normalization to stabilize activation distributions and improve gradient flow.
Use running training statistics for batch normalization during testing.
Verify the initial loss before training.
Overfit a tiny dataset before attempting full training.
Select the learning rate before tuning many other hyperparameters.
Search learning rates and regularization strengths in logarithmic space.
Use coarse-to-fine hyperparameter search.
Prefer random search over grid search when only some hyperparameters strongly influence performance.
Monitor loss, accuracy, activation distributions, gradient magnitudes, and update ratios.
A large training–validation gap suggests overfitting; similarly low training and validation performance suggests underfitting.
Successful neural-network training depends on maintaining healthy information flow in both directions: activations must remain useful during the forward pass, and gradients must remain large enough—but not excessively large—to support learning during backpropagation.

Ask anything
We've read this whole study set, so questions about it get the best answers.