-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cbow cbow_mean? #697
Comments
This is the backprop step; in order for the correction to the summed vectors, in the non-mean case, to net-total to the right number, the error must be split over all the constituent summands. See also this recent thread: https://groups.google.com/d/msg/gensim/BtN7uB1vgpc/tlvkLXqzJwAJ (which would be a better place for further discussion/questions that aren't bugs/feature-requests). |
Hi, @gojomo Thanks for pointing the thread. I believe that this is a bug in the code (at least looks to me), which also appears in the word2vec code (actually at first I found suspicious about the Milokov's word2vec code, then I thought it might help if I check gensim's implementation... Since I think this is a bug, I put my reason below here (sorry if you think I am abusing github):
You argument in google group was mainly about match the residual. However, residual happens to be the gradient of In addition, even in your case of Please let me know what do you think about this. |
Another line of argument is (in your variables average case), if we are considering linear combination of variables |
Reopening to discuss. My main thought is: when I would suggest:
|
Thanks for reopening. While, what I said above is mainly for the case when If Haven't played with gensim yet. I will try it and see if it makes a difference. |
(As just a note for others who come across this issue, I still believe there's no bug here – the code matches the gist of the algorithm and the behavior of the original word2vec.c implementation on which it was patterned.) |
Hi @dragonxlwang Did you get a response in the word2vec-toolkit forum on this issue? |
Closing as "won't fix" |
See also #1873 for more discussion of this & related issues that come up from time to time. |
The code Here:
Why average when
not model.cbow
? I thought this should bemodel.cbow_mean
instead.Appreciate if someone can help me out.
The text was updated successfully, but these errors were encountered: