← Teacher guide

Can a neural network learn?

Train and test a genuine tiny neural network without teaching the mathematics.

AI Foundations · How AI learns · about 30 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Before class

The board uses a small genuine 2-2-1 sigmoid neural network with backpropagation. It sees only colour and shape, not photographs. No account or online model is needed. The lesson ends by linking back to Unit 1: chatbots are very large neural networks trained to predict the next word. Optional extension, with school approval: train an image model in the Pattern Trainer (https://tools.learningwaypoints.com/trainer/, photos stay on the computer; Teachable Machine also works) and test photos not used in training. An image model processes much richer information than two hand-chosen clues; neither guarantees correct predictions.

Running the lesson

  1. Have students record a prediction before training.
  2. Reset the network whenever comparing training datasets.
  3. Ask what changed internally and what stayed the same.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

Students may think testing a new fruit automatically retrains the model.

When students get stuck

What you will seeA question to askThe fix
Student assumes an output label proves the model is right.What examples did it learn from? Does testing change the connections?Compare predictions before and after training on a reset network.

Answers to the checks

  1. Engage: what changes during training?: If you train a neural network with labelled examples, what is changing?
    Training changes the network's numerical connections, not the fruit or the underlying calculation rules.
  2. Explore: choose, train, test: Train the network, then record at least one prediction.
  3. What changes?: Which action changes the neural network's learned connections?
    Training with labelled examples
  4. What stays the same?: Suppose you train the network only on yellow bananas, then test a green, round fruit. Why might it get it wrong?
    It had no green or round examples to learn from
    It only trained on yellow bananas, so it never learned anything about green or round fruit.
  5. Evaluate: explain the difference: What is the strongest evidence that this network has learned from training?
    Its internal connections and later predictions can change

Solutions

One possible solution for each task. Other correct programs are fine.

Elaborate: can you teach it the wrong lesson?

Open task: any program that does what the step asks.

Stretch and support

Stretch: Show optional connection numbers; ask why they are not percentages.

Support: Start with all examples and compare one fruit before and after 100 training steps.

Exit ticket

What changes during training, and what happens during testing?

Training updates network parameters using labelled examples; testing uses them without updating.

Where it leads

The last lesson of Unit 2 names four kinds of AI (rules, predict or sort, make new content, take actions) and how each goes wrong.