Dividing data into tasks from dataset of type torch.utils.data.dataset.Subset based on label #406
-
Hi. I'm currently thinking of testing CL methods in Network Intrusion Domain. I have tested it on CICIDS17 Dataset which contains 15 labels (1 Normal and 14 attack). I've implemented some of CL algorithms and their accuracies can be found here. To compare across all metrics such as memory and others. I wanted to use Avalanche API. I have seen the dataset generators from
This Error is from 1208 in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi Akash, that error basically means that the datasets you provide to The You probably got your Subset from an original, bigger, Dataset: does the original dataset have a subset = AvalancheSubset(original_dataset, indices=[...]) Let me know if this works for you. Also, if the original dataset doesn't have a targets field, we can consider adapting and integrating it in Avalanche (should be easy)! |
Beta Was this translation helpful? Give feedback.
Hi Akash, that error basically means that the datasets you provide to
nc_scenario
must have atargets
field. Alas, theSubset
class found in PyTorch doesn't support it.The
targets
field should be alist
ofint
describing the class label of each pattern, which means that the size of that list must be equal to the number of patterns in the dataset.You probably got your Subset from an original, bigger, Dataset: does the original dataset have a
targets
field? If it already has atargets
field, then you can create the subset usingAvalancheSubset
instead of theSubset
class from PyTorch:Let me know if this works for you. Also, if the…