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

Regarding the definition of skipgram_word2vec() in tutorials/embedding/word2vec_optimized.py #1094

Closed
zhuangh opened this Issue Mar 1, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@zhuangh

zhuangh commented Mar 1, 2017

Even I can run the word2vec_optimized.py successfully, could anyone tell me the definition of skipgram_word2vec() in C++ files for this code line

examples, labels) = word2vec.skipgram_word2vec(filename=opts.train_data,
?

I cannot locate the related function in the C++ files or python scripts. It looks like "explicit SkipgramWord2vecOp(OpKernelConstruction* ctx)" in word2vec_kernels.cc

explicit SkipgramWord2vecOp(OpKernelConstruction* ctx)
. But there is no (explicit) wrapper skipgram_word2vec in word2vec_ops.cc, how do they connect to each other?

Thanks,

@AnmolChachra

This comment has been minimized.

Show comment
Hide comment
@AnmolChachra

AnmolChachra Mar 1, 2017

I have the same doubt.
I am running python version instead.
It also has this method "skipgram_word2vec()"

AnmolChachra commented Mar 1, 2017

I have the same doubt.
I am running python version instead.
It also has this method "skipgram_word2vec()"

@zhuangh

This comment has been minimized.

Show comment
Hide comment
@zhuangh

zhuangh Mar 2, 2017

can @nealwu help on this? thanks

zhuangh commented Mar 2, 2017

can @nealwu help on this? thanks

@nealwu

This comment has been minimized.

Show comment
Hide comment
@nealwu

nealwu Mar 2, 2017

Member

Hi @zhuangh, I would recommend reading this tutorial on ops in TensorFlow: https://www.tensorflow.org/extend/adding_an_op. It should help answer your questions.

Going to go ahead and close this issue. If something else comes up, feel free to reopen it.

Member

nealwu commented Mar 2, 2017

Hi @zhuangh, I would recommend reading this tutorial on ops in TensorFlow: https://www.tensorflow.org/extend/adding_an_op. It should help answer your questions.

Going to go ahead and close this issue. If something else comes up, feel free to reopen it.

@nealwu nealwu closed this Mar 2, 2017

@zhuangh

This comment has been minimized.

Show comment
Hide comment
@zhuangh

zhuangh Mar 2, 2017

@nealwu thanks. This answers my question.

@AnmolChachra FYI, it is about the "naming" and the automatic code generation. The content around "A note on naming: Inputs, outputs, and attrs generally should be given snake_case names." helped me understand.

zhuangh commented Mar 2, 2017

@nealwu thanks. This answers my question.

@AnmolChachra FYI, it is about the "naming" and the automatic code generation. The content around "A note on naming: Inputs, outputs, and attrs generally should be given snake_case names." helped me understand.

@AnmolChachra

This comment has been minimized.

Show comment
Hide comment
@AnmolChachra

AnmolChachra commented Mar 2, 2017

Thanks @nealwu and @zhuangh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment