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

Implement hardsigmoid and hardswish | feat(torchlib) #1216

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

justinchuby
Copy link
Collaborator

@justinchuby justinchuby commented Dec 12, 2023

Fixes #1210.

For hardsigmoid, y = max(0, min(1, alpha * x + beta)) where alpha=1/6 and beta=0.5 is equivalent with the pytorch definition
image

@justinchuby justinchuby added topic: torch_lib Related to the torch/aten function lib in development merge at lgtm Reviewers can merge when they approve labels Dec 12, 2023
@justinchuby justinchuby added merge at lgtm Reviewers can merge when they approve and removed merge at lgtm Reviewers can merge when they approve labels Dec 12, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8a3ba8f) 78.58% compared to head (74d9353) 78.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1216      +/-   ##
==========================================
+ Coverage   78.58%   78.62%   +0.04%     
==========================================
  Files         118      118              
  Lines       15492    15494       +2     
  Branches     2437     2439       +2     
==========================================
+ Hits        12174    12182       +8     
+ Misses       2918     2911       -7     
- Partials      400      401       +1     

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

Copy link

Test Results

         24 files         24 suites   1h 54m 1s ⏱️
  11 332 tests   8 435 ✔️     2 890 💤   7
273 532 runs  62 223 ✔️ 211 254 💤 55

For more details on these failures, see this check.

Results for commit 74d9353.

@titaiwangms titaiwangms merged commit 9edefbb into main Dec 12, 2023
32 of 37 checks passed
@titaiwangms titaiwangms deleted the justinchu/hard branch December 12, 2023 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge at lgtm Reviewers can merge when they approve topic: torch_lib Related to the torch/aten function lib in development
Projects
Development

Successfully merging this pull request may close these issues.

[torchlib] aten::hardsigmoid
2 participants