Derivative of softmax and consistent subscripts to paper#4
Open
enfeizhan wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @ronxin, Thank you for your awesome paper and wevi, which visualise the word2vec in a feasibly easy way.
Think it would be interesting to contribute to wevi while learning. After reading your codes I found the back-propagation function a bit strange. Seems that you didn't take into account the derivative of the softmax, aka the final output values, with respect to the values before taking softmax. Wondering is this some sort of approximation?
In this pull request, I have coded the derivative into the back-propagation function. In addition, I modified the subscripts as in the paper, i.e., k for input neurons, etc.
Please have a look if they are all good.
Didn't really do testing. Only run a couple of examples, looks like the king, queen, man, woman relation still holds.