Fixing minor bug in pretrained_word_embeddings example
@@ -101,7 +101,7 @@ y_val = labels[-num_validation_samples:]
print('Preparing embedding matrix.')
# prepare embedding matrix
-num_words = min(MAX_NUM_WORDS, len(word_index))
+num_words = min(MAX_NUM_WORDS, len(word_index) + 1)
embedding_matrix = np.zeros((num_words, EMBEDDING_DIM))
for word, i in word_index.items():
if i >= MAX_NUM_WORDS:
