AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Change one weight. Trace the signal to class scores.
A forward pass computes outputs from the current inputs and weights. Inputs stay fixed at x1=1 and x2=2. Each hidden node adds its weighted inputs and a fixed bias of −1, then applies ReLU, the rectified linear unit: max(0,sum). The output layer uses those hidden activations in raw class-score sums, with fixed bias 0. These authored weights are editable; no training is performed.
Arrows show connectivity, not weight magnitude. A thicker dashed purple edge and its weight label mark the selection. Use the named controls below; the graph has no drag targets.
Edit only the selected edge in quarter steps. Its source value stays separate from its weight. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
x2 → H1: source 2 × weight 0.5 = contribution 1.
Actual weight or scenario changes clear stale explanations and transfer answers. Selecting another edge or applying an unchanged value preserves them. Inputs and biases remain fixed.
A raw weighted sum of hidden outputs.
1
H1 × w(H1→A) + H2 × w(H2→A)
A raw weighted sum, with no output ReLU.
-1
H1 × w(H1→B) + H2 × w(H2→B)
The class with the larger raw score.
Class A
Compare scores; equal means Tie
Scores may be negative or exceed 1. They are not probabilities or measured accuracy.
Each term is source × weight. Add the terms and bias to get the sum. Hidden nodes apply ReLU to that sum; the output layer keeps its raw sum. The next layer consumes the hidden output, not its pre-activation sum. All displayed quarter/sixteenth values are exact in this model.
| Node / score | Weighted terms + bias | Sum | Output / score |
|---|---|---|---|
| H1 | 1×(1) + 2×(0.5) + (-1) | 1 | ReLU: 1 |
| H2 | 1×(-1) + 2×(1) + (-1) | 0 | ReLU: 0 |
| Class A | 1×(1) + 0×(-1) + (0) | 1 | Raw score: 1 |
| Class B | 1×(-1) + 0×(1) + (0) | -1 | Raw score: -1 |
This is an authored network with two inputs, two hidden nodes and two output scores. Every input connects to each hidden node; every hidden node connects to each output. Eight weights use −2..2 in increments of 0.25, encoded as integer units divided by 4. Hidden biases are −1; output biases are 0. Only the hidden layer uses ReLU. Negative final scores are valid raw sums.
Baseline weights in Weight edge order are 1,0.5,−1,1,1,−1,−1,1. Both hidden off changes x1→H1 to −1 and x2→H1 to 0. Both hidden active changes x1→H2 to 1. Reset and predictions restore Baseline for the current experiment; free Reset begins Experiment 1. Selecting an edge only changes the highlight. No training, gradient computation, probability conversion, classification accuracy, or recommendation of this architecture is supplied.
PyTorch · Weighted linear layer and bias