Skip to content

Conversation

@barakugav
Copy link
Contributor

No description provided.

@barakugav barakugav force-pushed the barak/softmax branch 4 times, most recently from ae1b162 to 61c18c9 Compare February 9, 2025 10:05
@akern40
Copy link
Collaborator

akern40 commented May 21, 2025

Hey @barakugav, thanks for the PR. I have two things I'm worried about here: first, softmax is a pretty ML-specific function that feels like it belongs in a different crate, not as part of ndarray itself. You'll see around the repo that the maintainers (cc @nilgoyette) try to be judicious about adding functions in order to not bloat the API. My second concern is that this is a fairly complex implementation when a simpler one also exists. Do you happen to have benchmarks on how this implementation compares to a simpler sum-then-divide approach?

@barakugav
Copy link
Contributor Author

the implementation is more complicate than the simpler sum-then-divide not due to performance, but due to float overflow., subtracting the max value is standard in softmax implementation and the regular implementation is not practical. Anyway, thanks for the feedback, ill look for a more appropriate crate for this implementation

@barakugav barakugav closed this May 25, 2025
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