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

Print module - implement module display for remaining modules (part2) #1933

Merged
merged 56 commits into from
Jun 28, 2024

Conversation

antimora
Copy link
Collaborator

@antimora antimora commented Jun 26, 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.

Related Issues/PRs

#1357

Changes

Added the module displays for the following modules:

  1. gelu
  2. loss
    • mse
    • huber
    • binary_cross_entropy
    • cross_entropy
  3. dropout
  4. leaky_relu
  5. pool
    • adaptive_avg_pool1d
    • adaptive_avg_pool2d
    • avg_pool1d
    • avg_pool2d
    • max_pool1d
    • max_pool2d
  6. norm
    • layer
    • rms
    • instance
    • group
    • batch
  7. prelu
  8. pos_encoding
  9. relu
  10. tanh
  11. unfold
  12. embedding
  13. attention
    • mha
  14. swiglu
  15. conv
    • conv_transpose1d
    • conv_transpose2d
    • conv1d
    • conv2d
  16. linear
  17. rnn
    • lstm
    • gru
  18. transformer
    • pwff
    • encoder
    • decoder
  19. rope_encoding

Testing

Added rendering unit tests for each module.

@antimora antimora marked this pull request as draft June 26, 2024 16:14
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

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

Project coverage is 85.04%. Comparing base (1ae1c03) to head (6045411).

Files Patch % Lines
crates/burn-core/src/nn/unfold.rs 92.85% 2 Missing ⚠️
crates/burn-core/src/nn/loss/cross_entropy.rs 96.29% 1 Missing ⚠️
crates/burn-train/src/learner/train_val.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1933      +/-   ##
==========================================
+ Coverage   84.56%   85.04%   +0.47%     
==========================================
  Files         793      793              
  Lines       93859    94590     +731     
==========================================
+ Hits        79370    80442    +1072     
+ Misses      14489    14148     -341     

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

@antimora antimora changed the title Print module part2 Print module - implement module display for remaining modules (part2) Jun 27, 2024
@antimora antimora marked this pull request as ready for review June 27, 2024 22:41
Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

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

Only one comment, approving in advance! 🙏

Comment on lines 41 to 44
linear_inner: Linear<B>,
linear_outer: Linear<B>,
dropout: Dropout,
gelu: Gelu,
Copy link
Member

Choose a reason for hiding this comment

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

We should put the parameters public.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed. I made other modules' attributes public for consistency since it's been requested frequently.

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.

LGTM! Thanks for also fixing the modules parameters and adding docstrings 🙏

@nathanielsimard nathanielsimard merged commit 98a58c8 into tracel-ai:main Jun 28, 2024
14 checks passed
@nathanielsimard nathanielsimard deleted the print-module-part2 branch June 28, 2024 12:37
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