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

Fix the slice for plotting attention #1088

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daniel-vainsencher
Copy link

Description

Before the fix, works only when interpretation["attention"] matches encoder_length (in which case the slice is not needed anyway). After, length matches always.

I'm running into this with encoder_length=0, which is probably a bug elsewhere, possibly in my code, but this is probably worth fixing anyway.

Checklist

NOT YET, will do if PR is desired

  • Linked issues (if existing)
  • Amended changelog for large changes (and added myself there as contributor)
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
    To run hooks independent of commit, execute pre-commit run --all-files

Make sure to have fun coding!

Before the fix, works only when `interpretation["attention"]` matches `encoder_length` (in which case the slice is not needed anyway). After, length matches always. 

I'm running into this with encoder_length=0, which is probably a bug elsewhere, possibly in my code, but this is probably worth fixing anyway.
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.

1 participant