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

Feat: Add Leaky Relu Model #1467

Merged
merged 1 commit into from Mar 14, 2024
Merged

Feat: Add Leaky Relu Model #1467

merged 1 commit into from Mar 14, 2024

Conversation

Arjun31415
Copy link
Contributor

@Arjun31415 Arjun31415 commented Mar 13, 2024

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.

Changes

Added Leaky Relu Activation Layer.
It internally just calls the functional prelu because they are almost the same.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 96.36364% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 85.79%. Comparing base (7a98b2f) to head (50531a6).
Report is 1 commits behind head on main.

❗ Current head 50531a6 differs from pull request most recent head aaff525. Consider uploading reports for the commit aaff525 to get more accurate results

Files Patch % Lines
crates/burn-core/src/nn/leaky_relu.rs 96.36% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1467      +/-   ##
==========================================
+ Coverage   85.70%   85.79%   +0.08%     
==========================================
  Files         645      647       +2     
  Lines       71953    72106     +153     
==========================================
+ Hits        61669    61863     +194     
+ Misses      10284    10243      -41     

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

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

Great. Thanks for the addition. A couple of changes needed:

  1. Tests
  2. Updating the book section with a new entry: https://burn.dev/book/building-blocks/module.html#general

@Arjun31415
Copy link
Contributor Author

Arjun31415 commented Mar 13, 2024

Great. Thanks for the addition. A couple of changes needed:

1. Tests

2. Updating the book section with a new entry: https://burn.dev/book/building-blocks/module.html#general

How do I test this ?. I have not added any new functionality,just calling the existing function within a Module.
I have noticed that there are no tests for GELU and RELU layers too, maybe because their functional code is being tested and covered. I do not know what to test here which already does not have a test written for it.

@antimora
Copy link
Collaborator

Great. Thanks for the addition. A couple of changes needed:

1. Tests

2. Updating the book section with a new entry: https://burn.dev/book/building-blocks/module.html#general

How do I test this ?

The test should go here: https://github.com/tracel-ai/burn/tree/main/crates/burn-core/tests

. I have not added any new functionality,just calling the existing function within a Module. I have noticed that there are no tests for GELU and RELU layers too, maybe because their functional code is being tested and covered. I do not know what to test here which already does not have a test written for it.

You're right it's missing for GELU and RELU but I believe we should have had them. Maybe it was justified because they're just modules on existing functions. LeakyRelu contains enough logic that needs verification. You must have tested to be confident it works, right? So we need the same tests checked in. This also helps a reviewer to see if all edge cases are covered.

@antimora
Copy link
Collaborator

Linking an existing open PR for the same functionality: #1208

I am not sure why it was stalled previously. BTW, it's okay not to do the ONNX part.

It contains tests you might want to reuse. Also it appears an activation function was added. I am not sure if this needs to be added in this case. I am tagging @nathanielsimard and @ashdtu

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

Thank you very much the addition. It looks good.

@antimora antimora merged commit 4de1272 into tracel-ai:main Mar 14, 2024
12 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.

None yet

3 participants