-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: add method TanhFunction #563
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new implementation of the Hyperbolic Tangent (Tanh) activation function to the Algorithms library. The implementation provides methods to compute tanh for both single values and vectors of values.
- Adds
Tanh.Compute(double)for single value computation usingMath.Tanh() - Adds
Tanh.Compute(double[])for element-wise vector computation - Includes comprehensive unit tests for the single value overload covering normal values, edge cases, and bounded output validation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Algorithms/Numeric/Tanh.cs | New static class implementing hyperbolic tangent function with single value and vector overloads |
| Algorithms.Tests/Numeric/TanhTest.cs | Unit tests covering single value computation with various test cases including edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #563 +/- ##
==========================================
+ Coverage 96.85% 96.87% +0.01%
==========================================
Files 289 290 +1
Lines 11903 11920 +17
Branches 1717 1720 +3
==========================================
+ Hits 11529 11547 +18
Misses 237 237
+ Partials 137 136 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@siriak can you check my pr |
siriak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR adds method TanhFunction.