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

add batch_sequence #197

Merged
merged 5 commits into from
Feb 4, 2025
Merged

add batch_sequence #197

merged 5 commits into from
Feb 4, 2025

Conversation

CarloLucibello
Copy link
Member

@CarloLucibello CarloLucibello commented Feb 4, 2025

Implements batch_sequence.
Similar to batchseq, takes as input a list of N sequences of different lengths and batches them together.

The output is different though:

  • batchseq returns a vector of length Lmax with elements with N observations
  • batch_sequence return an array of size (..., Lmax, N).

batch_sequence should be more useful in producing an output compatible with Flux v0.16 recurrent layers and attention block.

Close #78

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.47619% with 25 lines in your changes missing coverage. Please review.

Project coverage is 82.42%. Comparing base (e705227) to head (2c6b812).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/batch.jl 35.89% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #197      +/-   ##
==========================================
- Coverage   86.05%   82.42%   -3.63%     
==========================================
  Files          14       15       +1     
  Lines         710      717       +7     
==========================================
- Hits          611      591      -20     
- Misses         99      126      +27     

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

@CarloLucibello CarloLucibello merged commit 67d9d08 into main Feb 4, 2025
6 of 7 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.

Padded batching
2 participants