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

Add hard_shrink activation function #20470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shashaka
Copy link
Contributor

@shashaka shashaka commented Nov 8, 2024

Since Keras lacks built-in support for the hard_shrink activation function, I implemented it across TensorFlow, JAX, and NumPy, aiming to maintain consistency with existing implementations available in PyTorch.

@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.08%. Comparing base (8409e18) to head (9b18493).

Files with missing lines Patch % Lines
keras/api/_tf_keras/keras/activations/__init__.py 0.00% 1 Missing ⚠️
keras/api/_tf_keras/keras/ops/__init__.py 0.00% 1 Missing ⚠️
keras/api/_tf_keras/keras/ops/nn/__init__.py 0.00% 1 Missing ⚠️
keras/src/ops/nn.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20470   +/-   ##
=======================================
  Coverage   82.07%   82.08%           
=======================================
  Files         515      515           
  Lines       47416    47451   +35     
  Branches     7439     7440    +1     
=======================================
+ Hits        38919    38950   +31     
- Misses       6691     6695    +4     
  Partials     1806     1806           
Flag Coverage Δ
keras 81.93% <88.57%> (+<0.01%) ⬆️
keras-jax 65.01% <68.57%> (+<0.01%) ⬆️
keras-numpy 59.97% <74.28%> (+0.01%) ⬆️
keras-tensorflow 66.03% <65.71%> (-0.01%) ⬇️
keras-torch 64.93% <68.57%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants