Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description and code example do not match #12

Open
Danghor opened this issue May 29, 2023 · 0 comments
Open

Description and code example do not match #12

Danghor opened this issue May 29, 2023 · 0 comments
Assignees

Comments

@Danghor
Copy link

Danghor commented May 29, 2023

"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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants