-
Notifications
You must be signed in to change notification settings - Fork 440
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 sigmoid activation function #2112
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.
LGTM from my end!
One part that I am not sure about is if we need hard_sigmoid_backward function as well?
@nathanielsimard can you please confirm?
crates/burn-import/onnx-tests/tests/hard_sigmoid/hard_sigmoid.py
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2112 +/- ##
==========================================
+ Coverage 86.23% 86.27% +0.04%
==========================================
Files 688 690 +2
Lines 88465 88634 +169
==========================================
+ Hits 76285 76473 +188
+ Misses 12180 12161 -19 ☔ View full report in Codecov by Sentry. |
The only other activation function with a scalar parameter is |
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.
Thanks for adding the implementation all the way through ONNX import!
For the backward, I think it's fine for now. We can let autodiff handle it since it's implemented as a combination of other ops.
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
Required to load the DbNet and PaddlePaddle OCR ONNX models used in RapidOCR.
Changes
Testing
New unit tests and end-to-end ONNX tests.