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.026718
theory: 0
Sample variance
0.016273
theory: 0.015625
w1w2w3w4w5w6w7w8w9w10
0.01110.2047-0.09590.12300.0446-0.19090.03450.0760-0.06730.1507
0.08460.1943-0.2180-0.0703-0.01310.19940.0077-0.15320.12870.0836

Weight Distribution

-0.239-0.146-0.0530.0400.1330.2260.001.242.473.714.95SamplesTheoryDensityWeight 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.