c21 · E1

Practise: Attention, Images and Sequences

c21.E1.1E1 · expression

A row of twelve values reads 2, 1, 0, 0, 3, 3, 3, 0, 0, 1, 2, 2. A five-tap kernel with entries 1, 0, 0, 0, -1 slides across it with no padding. Give the number of outputs, the value of the first output, and the number of parameters the layer learns when it also has one bias.

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

c21.E1.2E1 · expression

A convolutional layer takes a row of 20 values and produces four feature maps of 16 outputs each. Each map uses a five-tap kernel and one bias. A fully connected layer produces the same 64 outputs from the same 20 inputs, with one bias per output. Give the parameter count of each layer and the ratio of the larger count to the smaller, to the nearest whole number.

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

c21.E1.3E1 · numeric

A scalar recurrent state multiplies its previous value by 0.8 at every step. The first word enters the state at step 0, and the state is updated six times after that. What fraction of the first word's contribution remains in the state? Give the answer to four decimal places.

c21.E1.4E1 · numeric

A scalar state applies a factor of 1.2 at every step. The first word enters at step 0, and the state is updated twenty times after that. By what factor has the first word's contribution grown? Give the answer to two decimal places.

c21.E1.5E1 · expression

Three earlier words offer the values 2, 4 and 8. Routing A gives them weights 0.5, 0.25 and 0.25. Routing B gives them weights 0.1, 0.3 and 0.6. Which routing produces the larger output, and what is that output?

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

c21.E1.6E1 · expression

One query meets three keys with dot products 3, 1 and 0. The softmax turns the scores into weights. Give the largest weight and the smallest weight, each to three decimal places.

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

c21.E1.7E1 · numeric

A transformer block applies layer normalisation to one position vector whose four entries are 1, 2, 4 and 5. Give the standardised value of the first entry, to three decimal places.

c21.E1.8E1 · expression

Attention costs about operations and a convolution of kernel width costs about , for a sequence of length and vectors of width . Take and . At what length do the two formulas give the same count, and what is that count?

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

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.