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

CAN Attention: standard management of headsand out_channels #276

Merged
merged 1 commit into from
May 14, 2024

Conversation

gbg141
Copy link
Member

@gbg141 gbg141 commented May 14, 2024

Standardizing the CAN attention mechanism. Now, as in other attention-based models, the argument out_channels actually represents the final number of output channels --i.e., it must be divisible by heads to successfully perform the attention mechanism.

Previously the actual output channels were computed as heads * out_channels, which could be misleading.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.37%. Comparing base (2267768) to head (3652f91).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #276   +/-   ##
=======================================
  Coverage   97.37%   97.37%           
=======================================
  Files          58       58           
  Lines        2054     2055    +1     
=======================================
+ Hits         2000     2001    +1     
  Misses         54       54           

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

@gbg141 gbg141 requested a review from ninamiolane May 14, 2024 19:02
Copy link
Collaborator

@ninamiolane ninamiolane left a comment

Choose a reason for hiding this comment

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

YES! Great catch, this could have been very confusing to users.

@ninamiolane ninamiolane merged commit 948754b into main May 14, 2024
24 checks passed
@ninamiolane ninamiolane deleted the can_attention branch May 14, 2024 23:47
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.

2 participants