c18 · E1

Practise: Getting Gradients From a Computer

c18.E1.1E1 · expression

Use at with step . Compute the one-sided quotient and the centred quotient . Give both to one decimal place and say which way the one-sided estimate errs.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c18.E1.2E1 · expression

A model has 250 parameters and returns one scalar loss. Forward mode returns the derivative along one input direction per pass; reverse mode returns the derivative of one output with respect to all inputs per pass. How many passes does each mode need for the full gradient?

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c18.E1.3E1 · numeric

Take at , . Seed the forward direction , so and . Carry the primal value and the tangent through and then . What tangent comes out?

c18.E1.4E1 · numeric

Take at and seed the direction . The product has value 0 and tangent 1. Use the rule that the tangent of an exponential is the input tangent times the output value. What tangent does carry?

c18.E1.5E1 · expression

Take at again. Seed the output with 1 and walk back through and . Give the two slopes and say how many backward passes produced them.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c18.E1.6E1 · expression

A computation graph takes , then , then , then . Give and the number of edges in the graph.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c18.E1.7E1 · expression

A chain has 16 blocks, a power of two. Recursive halving makes calls and holds slots. Storing everything makes calls and holds slots. Give the calls and slots of recursive halving, and the factor by which its calls exceed storing everything, to two decimal places.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c18.E1.8E1 · choice

A program computes a loss with a loop whose trip count depends on the input and with a branch inside the loop. Which route differentiates the program as it ran, exactly, without first building a formula?

(a) symbolic differentiation (b) one-sided numerical differentiation (c) automatic differentiation (d) none of the three

Choose one answer

Other tiers

E2 Derive · E3 Open

Every hint opened, solution viewed and answer checked is recorded in this browser only. See Progress to export or delete it.