sararob / keras-wine-model

Model built with the Keras Functional API
Apache License 2.0
83 stars 47 forks source link

Maybe shouldn't make pad with 0? #6

Open Wang-Yu-Qing opened 4 years ago

Wang-Yu-Qing commented 4 years ago

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?