Added a `supervised` flag for dataset getters
Setting this to `True` results in labeled `target_train` and `target_val` datasets.
Example:
python
from pytorch_adapt.datasets import get_mnist_mnistm
datasets = get_mnist_mnistm(
["mnist"],
["mnistm"],
folder=".",
supervised=True,
)
datasets["target_train"] and datasets["target_val"] are of type TargetDataset, with self.supervised = True
Setting `return_target_with_labels=True` returns type `TargetDataset` instead of `SourceDataset`
Example:
python
from pytorch_adapt.datasets import get_mnist_mnistm
datasets = get_mnist_mnistm(
["mnist"],
["mnistm"],
folder=".",
return_target_with_labels=True,
)
datasets["target_train_with_labels"] and datasets["target_val_with_labels"] are of type TargetDataset
Thanks to deepseek-eoghan for the contribution.