Skip to content

Commit

Permalink
Fixing minor bug in pretrained_word_embeddings example (keras-team#9438)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavithrasv authored and fchollet committed Feb 21, 2018
1 parent 531a8ea commit 4b9ba1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/pretrained_word_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
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:
Expand Down

0 comments on commit 4b9ba1b

Please sign in to comment.