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

Linear SVM includes same-class loss #9

Closed
icemiliang opened this issue Jan 1, 2019 · 1 comment
Closed

Linear SVM includes same-class loss #9

icemiliang opened this issue Jan 1, 2019 · 1 comment

Comments

@icemiliang
Copy link

icemiliang commented Jan 1, 2019

Assignment 1 Q2 Linear SVM
In assignment1/cs231n/classifiers/linear_svm.py
line 79: margins = np.maximum(0, scores - correct_class_scores +1)

It seems line 79 includes the same-class loss adding the total loss by a constant 1*num_train, which might be fine for training, but strictly speaking not correct.

@icemiliang
Copy link
Author

line 80 seems to have fixed it by making those values 0.

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

1 participant