Padding a Thousand Reviews to Fifty

Recurrent NetworksMedium+20 XP+20

Padding a Thousand Reviews to Fifty

A team has 1,0001{,}0001,000 product reviews to classify.

review lengthhow many reviews
555 tokens600600600
101010 tokens300300300
505050 tokens100100100

There are two ways to run them.

  • Padded — the fixed-input approach from Chapter 1. Take the longest review, 505050 tokens, and pad every shorter review with blanks up to that length. Every review then occupies 505050 slots, and every slot is processed.
  • Unrolled — an RNN, unrolled to each review's own length. A five-token review runs the cell five times and stops.

Call one run of the cell on one slot a token-step.

Across all 1,0001{,}0001,000 reviews, what percentage of the padded approach's token-steps is spent on blanks?

Round to the nearest whole percent.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.