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.0080527
theory: 0
Sample variance
0.012855
theory: 0.015625
w1w2w3w4w5w6w7w8w9w10
0.2601-0.02400.0983-0.1192-0.12580.0037-0.00270.0154-0.2477-0.1419
0.15070.10570.0140-0.09220.0214-0.01310.02280.0262-0.0057-0.1069

Weight Distribution

-0.273-0.161-0.0500.0620.1740.2850.001.292.573.865.15SamplesTheoryDensityWeight 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.