dataset
TorchDataset(inputs, outputs=None)
Bases: Dataset[tuple[Tensor, Tensor]]
Dataset for PyTorch.
Initialize the TorchDataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inputs
|
DataFrame
|
The input data. |
required |
outputs
|
DataFrame | None
|
The output data. Defaults to None. |
None
|
Source code in src/flowcean/torch/dataset.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
__len__()
Return the length of the dataset.
Source code in src/flowcean/torch/dataset.py
35 36 37 | |
__getitem__(item)
Return the item at the given index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
int
|
The index of the item to return. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Tensor, Tensor]
|
The inputs and outputs at the given index. |
Source code in src/flowcean/torch/dataset.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |