Inside a neural network / 1 of 7
Artificial neural networks
What you’ll learn
- Explain the main idea of “Artificial neural networks” in your own words.
- Trace a concrete example and identify the assumptions behind it.
- Apply the principle in a practice problem and recognize a common failure.
The idea, intuitively
A neural network is a composition of parameterized transformations. Each layer builds features from the previous layer. The brain analogy is limited: these are mathematical functions trained for specific objectives, not biological replicas.
Treat a neural network as a computation graph, not a mysterious black box. Follow a tiny input through each operation and keep track of tensor shapes. Distinguish the forward pass, gradient computation, and optimizer update. These three stages are connected but solve different parts of the learning problem.
Under the hood
Dense layers connect every input to every output. Depth counts successive transformations; width counts units within a layer. Training adjusts weights and biases, while the architecture specifies how computation is organized.
A larger network needs suitable data and evaluation; capacity alone is not competence.
A worked example
A 2–3–1 network transforms two inputs into three hidden activations and then one prediction. Hidden units need not correspond to named human concepts.
Follow one hidden unit with inputs [2, 1], weights [0.5, −1], and bias 0.2. Its weighted sum plus bias is 2 × 0.5 − 1 × 1 + 0.2 = 0.2. ReLU keeps 0.2 because it is positive. Increasing the second input to 2 makes the sum −0.8, so ReLU outputs 0. The next layer uses those hidden outputs as its inputs.
How to use this way of thinking
Build intuition with a small calculation before scaling dimensions. Check whether the architecture can represent the desired relationship, then whether optimization can learn it, then whether the learned solution generalizes. A failure in any one of these stages needs a different response.
See the mechanism
Set the network to 5 hidden units and both inputs to 0. Which units still have a nonzero activation? Check the bias column in the weights table.
Opening the experiment…
Try it yourself
Count parameters in a 2–3–1 dense network with a bias per non-input unit.
Key takeaways
- Weights and biases
- A larger network needs suitable data and evaluation; capacity alone is not competence.
- Check the assumptions with a small example before applying this idea to a larger system.
Check your understanding
Use feedback to learn. Quiz scores and lesson completion are tracked separately.
Go to lesson completionFurther reading
Original papers and reference material for this school. External resources may be in English and require internet access.
Dive into Deep Learning (opens a new tab)PyTorch: automatic differentiation (opens a new tab)Finish this lesson
Mark this lesson complete when you’re ready to continue.