We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The softmax derivative implemented is wrong, since each input of softmax layer affects other inputs of the same layer. Therefore, when calculating the derivative of certain softmax input, other inputs have to be taken into account also. A good explanation and clarification on the topic could be found here: (check Viviek's answer) https://stats.stackexchange.com/questions/235528/backpropagation-with-softmax-cross-entropy?newreg=2a0e1acc95e345d6b1d0197d64fa1b25
Xi - input value of index i S(Xi) - softmax of Xi
Softmax derivative when index input(i) == index output(j): S(Xi) * (1-S(Xj))
index input(i) == index output(j):
S(Xi) * (1-S(Xj))
Softmax derivative when index input (i) != index output (j): -S(Xi) * S(Xj)
index input (i) != index output (j):
-S(Xi) * S(Xj)
You can check my custom softmax layer implementation for more details.
The text was updated successfully, but these errors were encountered:
Merge pull request #12 from void-intelligence/develop
bd43b68
Closing #11
Successfully merging a pull request may close this issue.
The softmax derivative implemented is wrong, since each input of softmax layer affects other inputs of the same layer. Therefore, when calculating the derivative of certain softmax input, other inputs have to be taken into account also.
A good explanation and clarification on the topic could be found here: (check Viviek's answer) https://stats.stackexchange.com/questions/235528/backpropagation-with-softmax-cross-entropy?newreg=2a0e1acc95e345d6b1d0197d64fa1b25
Xi - input value of index i
S(Xi) - softmax of Xi
Softmax derivative when
index input(i) == index output(j):
S(Xi) * (1-S(Xj))
Softmax derivative when
index input (i) != index output (j):
-S(Xi) * S(Xj)
You can check my custom softmax layer implementation for more details.
The text was updated successfully, but these errors were encountered: