ml

Weight Initialization

Xavier Uniform/Normal, He Uniform/Normal, LeCun Normal, Random, Zeros, Ones — histogram of 20 samples vs theoretical PDF, per-activation recommendations.

Configuration

Formula
N(0, σ²), σ = √(2 / fan_in)
Computed: σ = 0.125
Sample mean
-0.014214
theory: 0
Sample variance
0.023007
theory: 0.015625
w1w2w3w4w5w6w7w8w9w10
-0.14630.0454-0.1658-0.0933-0.00960.1359-0.16210.11950.2104-0.0974
0.2149-0.07970.22830.1310-0.0916-0.14910.0276-0.26420.0650-0.2036

Weight Distribution

-0.289-0.180-0.0720.0360.1450.2530.001.062.123.184.25SamplesTheoryDensityWeight value
Sample histogramTheoretical distribution

Method Comparison

MethodParameterNotes
Xavier Uniformlimit = 0.1768
Xavier Normalσ = 0.1021
He Uniformlimit = 0.2165✓ recommended
He Normalσ = 0.125✓ recommended
LeCun Normalσ = 0.08839
Random Normalσ = 0.01
Random Uniformlimit = 0.05
Zeros⚠ symmetry
Ones⚠ symmetry
Tip: Click any row to switch method. Recommended methods are highlighted for the selected activation. He Normal is generally preferred for ReLU networks; Xavier for saturating activations.