vojko (4) [Avatar] Offline
#1
Hi,

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?

Thanks!
256385 (46) [Avatar] Offline
#2
There is a "truncating" argument that controls this behavior: https://keras.rstudio.com/reference/pad_sequences.html
vojko (4) [Avatar] Offline
#3
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".

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