dataset
DARTSDataset
Bases: Dataset
A dataset for the DARTS algorithm.
Source code in src/autora/theorist/darts/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 43 44 45 46 47 48 49 50 |
|
__getitem__(idx)
Returns the item at the given index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx |
int
|
The index of the item to return. |
required |
Returns:
Type | Description |
---|---|
Tuple[torch.tensor, torch.tensor]
|
The item at the given index. |
Source code in src/autora/theorist/darts/dataset.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
__init__(input_data, output_data)
Initializes the dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data |
torch.tensor
|
The input data to the dataset. |
required |
output_data |
torch.tensor
|
The output data to the dataset. |
required |
Source code in src/autora/theorist/darts/dataset.py
13 14 15 16 17 18 19 20 21 22 23 |
|
__len__(experiment_id=None)
Returns the length of the dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
experiment_id |
Optional[int]
|
None
|
Returns:
Type | Description |
---|---|
int
|
The length of the dataset. |
Source code in src/autora/theorist/darts/dataset.py
25 26 27 28 29 30 31 32 33 34 35 |
|
darts_dataset_from_ndarray(input_data, output_data)
A function to create a dataset from numpy arrays.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data |
np.ndarray
|
The input data to the dataset. |
required |
output_data |
np.ndarray
|
The output data to the dataset. |
required |
Returns:
Type | Description |
---|---|
DARTSDataset
|
The dataset. |
Source code in src/autora/theorist/darts/dataset.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|