Skip to content

Benchmark for sequence classification #874

Answered by AndreaCossu
davians12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @davians12 ! Thanks for reaching out.
One hack that should work exploits the fact that Avalanche dataset (as pytorch dataset) is able to return a variable number of elements.
So, when looping over the dataloader you can have a variable number of tensors: for x, y, a, b, ..., t in dataloader.

Consider that in avalanche the BaseStrategy defines the input mb_x as the first element returned by the dataloader, the target mb_y as the second and the (optional) task label mb_task_id as the last one (see here the properties I am mentioning).

So, you can:

  1. create your benchmark by putting in the dataset (tensor dataset or other kinds) the input tensors in the first position, fake targets (an int…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vlomonaco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants