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

There is an error in the LogSoftmax function. #107

Open
happy1004s opened this issue Jul 1, 2024 · 0 comments
Open

There is an error in the LogSoftmax function. #107

happy1004s opened this issue Jul 1, 2024 · 0 comments

Comments

@happy1004s
Copy link

LogSoftmax

float max = FLT_MIN;
-->
float max = -FLT_MAX;

As you know, [FLT_MIN] represents the minimum positive value. Given the structure of the algorithm, I believe -FLT_MAX should be used instead of FLT_MIN.
Because of this, when all the input data is negative, the maximum value among the negatives is not selected. Instead, [FLT_MIN] is chosen, resulting in strange output.

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