nlp-with-transformers / notebooks

Jupyter notebooks for the Natural Language Processing with Transformers book
https://transformersbook.com/
Apache License 2.0
3.7k stars 1.13k forks source link

Chapter 5 - error in formula #92

Open yonigottesman opened 1 year ago

yonigottesman commented 1 year ago

The problem arises in chapter:

Describe the bug

image I think the softmax is calculated on z_t, and i is taken on the result of the softmax. not like in the book where the softmax is calculated on a single logit t,i which doesnt make sense, softmax needs all the "i"s

Expected behavior

The formula should look like this: image