Bayesian Neural Network Demo

In a traditional neural network, weights are fixed numbers ($W = 0.5$). In a Bayesian Neural Network (BNN), weights are probability distributions ($W \sim \mathcal{N}(0.5, 0.2)$).

Click "Sample & Run" to draw a random weight matrix from the distributions and see how the output changes. Repeated sampling reveals the model's uncertainty.

Input $X$ (1x4)
Fixed Data
×
Bayesian Weights $P(W)$ (4x2)
$\mu$ (Mean) ± $\sigma$ (StdDev)
Sampled $W_{i}$
Random Draw
=
Output $Y_{i}$ (1x2)
$Y = X \times W_{i}$