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

About loss function #3

Closed
josianerodrigues opened this issue Jul 30, 2018 · 1 comment
Closed

About loss function #3

josianerodrigues opened this issue Jul 30, 2018 · 1 comment

Comments

@josianerodrigues
Copy link

Hi @pangwong,
Thank you for sharing your project with us.
I saw that the loss function you're using for multilabel classification is CrossEntropyLoss function. I thought this function was only used for one-label classification. Could you explain how you used the CrossEntropyLoss function for multilabel classification? I'm trying to run my model for the NUSWIDE dataset using the MultiLabelSoftMarginLoss function, but the accuracy is getting pretty low.

@pangwong
Copy link
Owner

For a multi-label classification problem, we regard each label as a single classification problem, so the final loss is sum of CrossEntropyLoss of each label. As for MultiLabelMarginLoss, it's similar with a combination of multiple HingeLoss for Multi-Class problem, also similar with SVM classifier.

@pangwong pangwong closed this as completed Aug 1, 2018
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