lesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playgroundlesson 4 of 4 · mission: tensor playground
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving.
The full mission loop: with relu implemented (gated forward and backward), train the neuron pred = relu(w*x + b) against squared-error loss for 4 steps at lr=0.05 — zeroing BOTH grads before each backward, updating both parameters after. Print f"step {step}: loss={loss.data:.4f}" each step and finish with f"final pred={...:.3f} (target {target})". The loss must fall every step — on machinery you built end to end.