Tutelage

Lessons › coding and computer science · taught by Leo

Neural networks explained step by step

Learn how neurons weight inputs, use activations, stack layers, and train by reducing prediction error.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app

A network is pattern-matching layers

A neural network is just a stack of tiny decision steps. It takes inputs, mixes them, and makes a prediction.

Think of it like a recipe with many small taste checks instead of one giant guess.

What each neuron does

Each neuron gets numbers in, gives each one a weight, and adds them up.

Then an activation function shapes the result. That is the neuron’s output.

Predict the next step

If an input is more important, what should happen to its weight?

  1. Make it larger
  2. Make it zero
  3. Remove the input
Show answer

Make it larger: Yes. A larger weight means that input has more influence.

A neuron with numbers

Let’s do one neuron with real numbers.

First multiply each input by its weight, then add them. That gives the score going into the activation.

The activation turns that score into the neuron’s output.

What happens after the sum?

After you add the weighted inputs, what usually happens next?

  1. Apply an activation function
  2. Divide by zero
  3. Forget the weights
Show answer

Apply an activation function: Correct. The activation function decides how much signal passes on.

Why activations matter

Without activation, a stack of layers would act too much like one big linear formula. Activations add bending, so the network can learn more complex patterns.

That lets the network draw curved boundaries, not just straight lines.

Why layers are useful

Early layers often learn simple things, like edges or small patterns.

Middle layers combine those pieces into bigger ideas.

Late layers use that to make the final decision.

Training means reducing error

Training is how the network gets better. It checks how wrong it is, then changes weights to lower the error.

On the board, the low point is the goal. Learning tries to move toward that valley.

What is training doing?

What is the main goal of training a neural network?

  1. Lower the error on examples
  2. Make every weight equal
  3. Delete hidden layers
Show answer

Lower the error on examples: Yes. Training adjusts the weights to reduce prediction error.

How learning updates weights

The network predicts, compares that to the answer, and measures error.

Then it updates the weights a little bit to do better next time.

Your turn: one neuron step

A neuron has inputs 1 and 4, with weights 2 and 3. What is the weighted sum before activation?

  1. 14
  2. 9
  3. 7
Show answer

14: Correct. One times two plus four times three equals 14.

Neural network recap

Use this checklist: mix inputs with weights, apply an activation, stack layers, then train by lowering error.

That is the core idea of a neural network in four moves.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app