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.030886
theory: 0
Sample variance
0.027046
theory: 0.015625
w1w2w3w4w5w6w7w8w9w10
0.2054-0.2718-0.0617-0.23130.0749-0.1995-0.16840.28020.02090.0388
0.02390.01160.18420.21290.13260.1898-0.14360.00040.17270.1457

Weight Distribution

-0.299-0.178-0.0570.0650.1860.3080.000.951.892.843.79SamplesTheoryDensityWeight 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.