60-second card
Neurons and layers
A neuron multiplies each input by a weight, adds them up with a bias, then applies an activation. Layers are many neurons side by side.
- A dense layer is a matrix multiply: outputs = W · x + b.
- Parameters per dense layer = inputs × neurons + neurons.
- Hidden layers between input and output make a network 'deep'.
inputs, neurons = 4, 3
print(inputs * neurons + neurons)Prints
15Remember: Weights and biases are what training learns.
Common mistake: Forgetting the biases when counting a layer's parameters.