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

Adding burn::nn::Sigmoid #2031

Merged
merged 3 commits into from
Jul 17, 2024
Merged

Adding burn::nn::Sigmoid #2031

merged 3 commits into from
Jul 17, 2024

Conversation

RuelYasa
Copy link
Contributor

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#2030

Changes

Add a Sigmoid struct in nn just like Relu and Gelu etc.
Specifically:

  1. Added sigmoid.rs in burn_core/src/nn
  2. Added mod sigmoid; and pub use sigmoid::*; in burn_core/src/nn/mod.rs

Testing

  1. cargo check succeeded.
  2. mod tests succeeded.
  3. run-checks all script failed due to
error: struct `ThreadId` is never constructed
  --> crates/burn-common/src/stub.rs:99:12
   |
99 | pub struct ThreadId(core::num::NonZeroU64);
   |            ^^^^^^^^
   |

, but it is seemingly an existing problem, which is irrelative to my modification.
An earlier PR also mentioned the problem.

RuelYasa added 2 commits July 17, 2024 17:01
	新文件:   crates/burn-core/src/nn/sigmoid.rs
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.25%. Comparing base (ed8a91d) to head (77aad0a).

Files Patch % Lines
crates/burn-core/src/nn/sigmoid.rs 75.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2031   +/-   ##
=======================================
  Coverage   84.25%   84.25%           
=======================================
  Files         845      846    +1     
  Lines      105444   105456   +12     
=======================================
+ Hits        88842    88853   +11     
- Misses      16602    16603    +1     

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

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for resolving your own issue 😄

LGTM! Just a minor change regarding the docstring.

crates/burn-core/src/nn/sigmoid.rs Outdated Show resolved Hide resolved
@RuelYasa
Copy link
Contributor Author

Oops... I forgot to git push!
It should be alright now.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nathanielsimard nathanielsimard merged commit 9804bf8 into tracel-ai:main Jul 17, 2024
14 checks passed
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.

3 participants