Formula
Computational Cost of Greedy Search in Sequence-to-Sequence Models
In contrast to exhaustive search, the computational cost of greedy search in sequence-to-sequence generation is linearly proportional to the sequence length, given by , where is the vocabulary size and is the sequence length. This makes it miraculously cheap, although far from optimal. For example, with a vocabulary of and a sequence length of , greedy search only requires evaluating sequences.
0
1
Updated 2026-05-14
Tags
D2L
Dive into Deep Learning @ D2L