1 / 13
THE SCENARIO

Up the Trail and Back Down

A hiker climbs a mountain trail. At every signpost along the way, she stops and chalks the altitude onto the post.

At the top she reads her watch and her map. She has her answer: the summit is 1,400 metres up.

Then she turns around and walks back down the same trail. This time she is asking a different question: which stretch of that climb was the steepest? And she can answer it, because the numbers she chalked on the way up are still sitting there on the posts.

One trail. Two journeys, in opposite directions. And the second journey only works because the first one left something behind.

This lesson is about doing exactly that with a computational graph.

A hiker walking back down a trail, collecting a coloured stone left at each post on the way up

A hiker walking back down a trail, collecting a coloured stone left at each post on the way up