ContinualAI / ContinualAI/avalanche

VOCSegmentation - Unsupported dataset when creating a scenario

Open
#826 4 comments 0 reactions 0 assignees View on GitHub
Benchmarks bug
Dominant language
Python
Stars
2.1k
Forks
321
PR merge metrics
No merged PRs in 30d

Description

🐛 **Describe the bug**
When creating a new _nc\_benchmark_ or _ni\_benchmark_ I get a `Unsupported dataset: must have a valid targets field or has to be a Tensor Dataset with at least 2 Tensors` error when using the VOCSegmentation dataset from avalanche.benchmarks.datasets.

🐜 **To Reproduce**
```
train_VOC = VOCSegmentation('./data/VOC', download=False, transforms=train_transform, image_set="train")
val_VOC = VOCSegmentation('./data/VOC', download=False, transforms=train_transform, image_set="val")

scenario = nc_benchmark(
train_VOC, val_VOC, n_experiences=3, shuffle=True, seed=1234, task_labels=False
)
```

🐝 **Expected behavior**
The scenario should work with a segmentation dataset just as it works with other classification datasets like MNIST or CIFAR10. I have managed to trace it to the fact that it has a tuple of tensors for each pair while the _nc_benchmark_ expects something else.

I don't know how to fix it myself, does anyone have any suggestions?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.