Inputs
The neuron takes numbers: x₁ = 2, x₂ = 1. The third input is always 1; its weight will be b. Tap a node to change its value.
Weights
Each input has a weight: w₁ = 0.80, w₂ = −0.50, b = 0.20. A red line is a positive weight, a blue line a negative one; the thicker the line, the larger the weight. Learning means tuning these numbers.
Input times weight
Each input is multiplied by its weight: 2 · 0.80 = 1.60, 1 · −0.50 = −0.50, 1 · 0.20 = 0.20. An input with a large weight affects the result more.
The sum
The products are added: z = 1.60 + −0.50 + 0.20 = 1.30. This is the same linear score as in logistic regression.
Activation
The sum passes through the sigmoid: y = σ(1.30) = 0.79. The activation limits the neuron's output and adds a non-linear step to the network.
The neuron fires
The output is 0.79, at or above 0.5: the neuron says 1 for this input. The red circle is a firing neuron.
Why it matters
A neural network is thousands of these units connected in layers. This simple computation, inspired by the brain's neuron, is also the building block of language models.