avalanche
avalanche copied to clipboard
Hotfix to add_transforms_to_group method in AvalancheDataset
This method has a code mistake when you try to add a new target_transform to a group that is not the current group. I opened a pull request to fix it with some unit tests for future regression tests.
🐜 To Reproduce
dataset_mnist = MNIST(
root=expanduser("~") + "/.avalanche/data/mnist/", download=True
)
target_transform = lambda label: label+1
dataset = AvalancheDataset(dataset_mnist)
dataset = dataset.add_transforms_to_group(
group_name='eval',
target_transform=target_transform,
)
dataset = dataset.eval()
🐝 Expected behavior
dataset.target_transform == target_transform
🐞 Screenshots If applicable, add screenshots to help explain your problem.
🦋 Additional context Add any other context about the problem here like your python setup.
I did a pull request #1000.