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.044627
theory: 0
Sample variance
0.016898
theory: 0.015625
w1w2w3w4w5w6w7w8w9w10
0.0778-0.19170.06230.0081-0.0057-0.1654-0.03800.09390.0954-0.0406
-0.1559-0.0808-0.1133-0.18380.1350-0.0294-0.32530.01560.1504-0.2012

Weight Distribution

-0.349-0.244-0.140-0.0350.0700.1740.001.102.203.304.40SamplesTheoryDensityWeight 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.