-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I think the code "gradOutsideVecs[negSampleWordIndices] += np.outer((z-1),centerWordVec)*(-1)", at line 147 of word2vec.py, assigment 2, is not right.
Because as the annotation says, "Note: The same word may be negatively sampled multiple times. For example if an outside word is sampled twice, you shall have to double count the gradient with respect to this word."
I write testing codes, gradOutsideVecs[negSampleWordIndices] could not double the gradient, it only add one time(the last one).
rockqgf, Lalalaashen, ForeverFancy, Zhuifeng414 and leyuan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working