Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. word_index = {k:v for k,v in tokenizer.word_index.items()}
  2. word_index["<PAD>"] = 0
  3.  
  4. vocab_size = len(word_index)
  5.  
  6. maxLen = length_longest_sentence
  7. data = tf.keras.preprocessing.sequence.pad_sequences(sent_numeric,
  8. value=word_index["<PAD>"],
  9. padding='post',
  10. maxlen=maxLen)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement