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

Assignment 1 q2_neural.py softmax gradient not explicitly calculated #17

Open
rshamsy opened this issue Feb 13, 2019 · 1 comment
Open

Comments

@rshamsy
Copy link

rshamsy commented Feb 13, 2019

In calculating gradients, the gradient of the softmax function is not calculated using the formula that is derived in the lecture notes. It seems like in the code, this step is skipped over, and the gradient of the cost function with respect to yhat is used only ('d3' variable). Am I missing something here?

@Spico197
Copy link

I found the codes in Backprop is nothing wrong. Actually, binary classification via cross entropy with softmax has a very simple derivative formula, which is yhat - labels. You can find more details in https://deepnotes.io/softmax-crossentropy

Hope this would help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants