source_dataset
SourceDataset
¶
Bases: DomainDataset
Wrap your source dataset with this. Your source dataset's
__getitem__ function should return a tuple of (data, label).
Source code in pytorch_adapt\datasets\source_dataset.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
__getitem__(idx)
¶
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dictionary with keys
|
Source code in pytorch_adapt\datasets\source_dataset.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
__init__(dataset, domain=0)
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset |
Dataset
|
The dataset to wrap |
required |
domain |
int
|
An integer representing the domain. |
0
|
Source code in pytorch_adapt\datasets\source_dataset.py
14 15 16 17 18 19 20 | |