You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You write "word2vec++ code is simple and well documented". Could you please help me with some link to a document which could help me to understand the math behind the line you inherited from the original code:
File trainThread, line 237:
auto gradientXalpha = (1.0f - static_cast(huffmanData->huffmanCode[i]) - f) * (*m_sharedData.alpha);
I can't grasp the idea behind this "1.0f - ...".
As I understand the gradient intended to mack Huffman code as close as possible to value f we calculated above. If so, what is the reason of this "1.0f - ..."? Especially taking into account that the huffmanCode is either 0 or 1, so this "1-..." just reverses it. What it the intend/logic behind it?
The text was updated successfully, but these errors were encountered:
DamirTenishev
changed the title
Where can I find documentation on calculation of gradient g in word2vec?
Where can I find documentation on calculation of gradient gradientXalpha in word2vec?
Aug 5, 2024
You write "word2vec++ code is simple and well documented". Could you please help me with some link to a document which could help me to understand the math behind the line you inherited from the original code:
File trainThread, line 237:
auto gradientXalpha = (1.0f - static_cast(huffmanData->huffmanCode[i]) - f) * (*m_sharedData.alpha);
I can't grasp the idea behind this "1.0f - ...".
As I understand the gradient intended to mack Huffman code as close as possible to value f we calculated above. If so, what is the reason of this "1.0f - ..."? Especially taking into account that the huffmanCode is either 0 or 1, so this "1-..." just reverses it. What it the intend/logic behind it?
The text was updated successfully, but these errors were encountered: