Multilayer Perceptron · Module 1
Neural Network Architecture
1. What are we training?
Trainable connections glow subtly.
How many weights and biases will be trained?
Every connection has one weight, and every neuron after the input layer has one bias. Count them one pair of adjacent layers at a time:
- Input → hidden layer 1
- 5 × 4 = 20 weights
- 4 biases
- Hidden layer 1 → 2
- 4 × 3 = 12 weights
- 3 biases
- Hidden layer 2 → 3
- 3 × 2 = 6 weights
- 2 biases
- Hidden layer 3 → output
- 2 × 1 = 2 weights
- 1 bias
- Parameters to train
- 40 weights
- 10 biases
- Total trainable parameters
- 50
2. What does one neuron do?
The first hidden neuron receives all five inputs. Each input is multiplied by its connection weight, then the results are added with one bias term.
Its calculation is:
- the five input features.
- the weights for those inputs.
- the bias added to the weighted inputs.
- the weighted inputs plus the bias.
- the activation function.
- the value sent forward after activation.
The same calculation happens at every neuron. Each neuron in hidden layer 2 receives the activation values from all neurons in hidden layer 1 as its inputs.