Skip to content

Use softmax rather than argmax and provide unit tests #2

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jwallwork23
Copy link
Collaborator

As @ma595 suggested, use of argmax was making the loss function non-differentiable and softmax should be used instead.

This PR makes this change and adds some unit tests, including one that checks the loss function values sum to 1, as should be the case for a classification problem.

@jwallwork23 jwallwork23 requested a review from ma595 May 8, 2025 10:44
@jwallwork23 jwallwork23 self-assigned this May 8, 2025
@jwallwork23 jwallwork23 added bug Something isn't working enhancement New feature or request labels May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant