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

Maybe shouldn't make pad with 0? #6

Open
Wang-Yu-Qing opened this issue Feb 14, 2020 · 0 comments
Open

Maybe shouldn't make pad with 0? #6

Wang-Yu-Qing opened this issue Feb 14, 2020 · 0 comments

Comments

@Wang-Yu-Qing
Copy link

When padding the seq of description, the code use default value 0 to pad:

train_embed = keras.preprocessing.sequence.pad_sequences(
    train_embed, maxlen=max_seq_length, padding="post")
test_embed = keras.preprocessing.sequence.pad_sequences(
    test_embed, maxlen=max_seq_length, padding="post")

But in the description encoding process, 0 refer to one specific word. I think maybe use max(encode_value)+1 as padding value?

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

1 participant