Skip to content

Fix the bug of non-convergence when use SparseCategoricalCrossentropy #1018

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

Merged
merged 1 commit into from
Apr 7, 2023
Merged

Fix the bug of non-convergence when use SparseCategoricalCrossentropy #1018

merged 1 commit into from
Apr 7, 2023

Conversation

Wanglongzhi2001
Copy link
Collaborator

I found that the reason why the model does not converge lies in this SparseCategoricalCrossentropy function, when I change it to CategoricalCrossentropy and do ont-hot on y_train it works well. So the problem is this loss function. I found the from_logits used by the Apply function is not the from_logits that comes in the constructor. So it will always be false even if we specify it as true when we use SparseCategoricalCrossentropy.

@Oceania2018 Oceania2018 merged commit 33333df into SciSharp:master Apr 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants