Skip to Content
Advanced Deep Learning with Python
book

Advanced Deep Learning with Python

by Ivan Vasilev
December 2019
Intermediate to advanced content levelIntermediate to advanced
468 pages
14h 28m
English
Packt Publishing
Content preview from Advanced Deep Learning with Python

Luong attention

Luong attention (see Effective Approaches to Attention-based Neural Machine Translation at https://arxiv.org/abs/1508.04025) introduces several improvements over Bahdanau attention. Most notably, the alignment scores et depend on the decoder hidden state st, as opposed to st-1 in Bahdanau attention. To better understand this, let's compare the two algorithms:

Left: Bahdanau attention; right: Luong attention

Let's go through a step-by-step execution of Luong attention:

  1. Feed the encoder with the input sequence and compute the set of encoder hidden states .
  2. Compute the decoder hidden state based on the previous decoder hidden ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Deep Learning Algorithms with Python

Hands-On Deep Learning Algorithms with Python

Sudharsan Ravichandiran
Python Deep Learning - Second Edition

Python Deep Learning - Second Edition

Ivan Vasilev, Daniel Slater, Gianmario Spacagna, Peter Roelants, Valentino Zocca

Publisher Resources

ISBN: 9781789956177Supplemental Content