Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ch4/03_Word2Vec_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
" feats = []\n",
" for tokens in list_of_lists:\n",
" feat_for_this = np.zeros(DIMENSION)\n",
" count_for_this = 0\n",
" count_for_this = 0 + 1e-5 # to avoid divide-by-zero \n",
" for token in tokens:\n",
" if token in w2v_model:\n",
" feat_for_this += w2v_model[token]\n",
Expand Down