You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Let's truncate the reviews to `maxlen` first words, and pad any shorter reviews with zeros at the end."
The comment says that the sequences are truncated and padded at the end. However, the following code calls keras.utils.data_utils.pad_sequences (which we can see using the help() function). This function will by default truncate and pad in the beginning. When we look at the documentation for tf.keras.preprocessing.sequence, it says that this API is deprecated. I don't know that function should be used in the end, but the description and the code do not match. Maybe
padding='post',
truncating='post',
should be added or the description changed.
The text was updated successfully, but these errors were encountered:
intro-to-dl/day1/04-tf2-imdb-rnn.ipynb
Line 78 in 4e99811
The comment says that the sequences are truncated and padded at the end. However, the following code calls
keras.utils.data_utils.pad_sequences
(which we can see using thehelp()
function). This function will by default truncate and pad in the beginning. When we look at the documentation for tf.keras.preprocessing.sequence, it says that this API is deprecated. I don't know that function should be used in the end, but the description and the code do not match. Maybeshould be added or the description changed.
The text was updated successfully, but these errors were encountered: