0
0
TensorFlowml~5 mins

Weight initialization strategies in TensorFlow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of weight initialization in neural networks?
Weight initialization sets the starting values of the model's weights before training. Good initialization helps the model learn faster and avoid problems like vanishing or exploding gradients.
Click to reveal answer
intermediate
Explain the difference between Xavier (Glorot) and He initialization.
Xavier initialization sets weights to keep variance of activations similar across layers, good for sigmoid/tanh activations. He initialization adjusts weights for ReLU activations to better handle their behavior and avoid dying neurons.
Click to reveal answer
beginner
What problem does He initialization help to solve?
He initialization helps prevent the problem of dying ReLU neurons by scaling weights properly so that the variance of outputs stays stable through layers.
Click to reveal answer
beginner
How does random initialization differ from zero initialization, and why is zero initialization usually bad?
Random initialization assigns small random values to weights, breaking symmetry so neurons learn different features. Zero initialization sets all weights to zero, causing all neurons to learn the same thing and preventing effective training.
Click to reveal answer
beginner
Name two common TensorFlow functions used for weight initialization.
Two common TensorFlow initializers are tf.keras.initializers.GlorotUniform() for Xavier initialization and tf.keras.initializers.HeNormal() for He initialization.
Click to reveal answer
Which weight initialization method is best suited for ReLU activation functions?
AHe initialization
BXavier initialization
CZero initialization
DRandom initialization with zeros
Why is zero initialization of weights usually a bad idea?
AIt makes the model too complex
BIt causes all neurons to learn the same features
CIt uses too much memory
DIt speeds up training too much
What does Xavier initialization aim to keep stable across layers?
ANumber of neurons
BLearning rate
CVariance of activations
DBias values
Which TensorFlow initializer corresponds to Xavier initialization?
Atf.keras.initializers.Zeros()
Btf.keras.initializers.HeNormal()
Ctf.keras.initializers.RandomNormal()
Dtf.keras.initializers.GlorotUniform()
What problem can occur if weights are initialized with very large values?
AExploding gradients
BVanishing gradients
CFaster convergence
DBetter accuracy
Describe why weight initialization matters and name two common strategies.
Think about how starting weights affect learning speed and stability.
You got /3 concepts.
    Explain how He initialization helps with ReLU activations and what problem it prevents.
    Consider the behavior of ReLU and how weights influence neuron output.
    You got /3 concepts.