Premium Content
Sign in to see the full question
Get access to the full problem, solutions, follow-up questions, and discussion.
Get access to the full problem, solutions, follow-up questions, and discussion.
Implement beam search, a decoding algorithm widely used in sequence-to-sequence models (machine translation, text generation, speech recognition). Given a starting token sequence, a function that...