-
This seems trivial, but I couldnt find appropriate method for taking only a fraction of dataset/benchmark. How can I do it on this exemplary code where I use both, benchmark and dataset?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @Bard2803! You can subset an AvalancheDataset: https://avalanche-api.continualai.org/en/v0.4.0/generated/avalanche.benchmarks.utils.AvalancheDataset.html#avalanche.benchmarks.utils.AvalancheDataset As for the benchmarks we have a benchmark generator to create a validation stream: https://avalanche-api.continualai.org/en/v0.4.0/generated/avalanche.benchmarks.generators.benchmark_with_validation_stream.html |
Beta Was this translation helpful? Give feedback.
The subset method of the AvalancheDataset allows you to specify the sequence of index you want to consider. So you can look at their labels and randomly select 20% for each class. Once you have the list of indices you can call the subset method and use the resulting dataset, no?