vojko (4) [Avatar] Offline

In Listing 6.6:

pad_sequences(x_train, maxlen = maxlen)

truncates the sequence from the begining, so we look at the last 20 words in every review?

256385 (46) [Avatar] Offline
There is a "truncating" argument that controls this behavior: https://keras.rstudio.com/reference/pad_sequences.html
vojko (4) [Avatar] Offline
Yes, I understand that, I was referring to the explanation in text :

"You get to a validation accuracy of ~76%, which is pretty good considering that you’re only looking at the first 20 words in every review".

256385 (46) [Avatar] Offline
Indeed, I see that now! Just fixed within the manuscript.