Skip to content
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

Conflicts between hyperparameters for negative sampling? #2844

Closed
datistiquo opened this issue May 18, 2020 · 1 comment
Closed

Conflicts between hyperparameters for negative sampling? #2844

datistiquo opened this issue May 18, 2020 · 1 comment
Labels
question Discussions that are generally off-topic for the github issue tracker

Comments

@datistiquo
Copy link

Hi,

I wonder if there are possible interactions/conflicts when you use negative sampling with negative>0 and have hierarchical softmax accidentally activated hs=1? The docs says that only if hs=0 negative sampling will be used (negative>0). So I can hope that still if hs=1 and negative>0 hopefully no negative sampling is used?

Python 3.6
Win 10
NumPy 1.18.1
SciPy 1.1.0
gensim 3.8.1

@gojomo
Copy link
Collaborator

gojomo commented May 18, 2020

No, if both hs and negative are both non-zero, two output layers will be allocated, and both will be trained, backpropagating their corrections to the same shared input-vectors. This is an odd mode of operation, unlikely to be optimal in any situation, but matches the original word2vec.c from Google on which the gensim implementation was based. See also #2550 for more discussion. And, the project discussion list at https://groups.google.com/forum/#!forum/gensim is a better place for questions/support, reserving this issue-tracker for bugs & feature-requests.

@gojomo gojomo closed this as completed May 18, 2020
@mpenkov mpenkov added the question Discussions that are generally off-topic for the github issue tracker label Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Discussions that are generally off-topic for the github issue tracker
Projects
None yet
Development

No branches or pull requests

3 participants