Lstmdataloader
Bases: pl.LightningDataModule
Data loader for the LSTM model.
Initialize the data loader.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
train_sequences |
List[Tuple[pd.DataFrame, float]]
|
List of training sequences. |
required |
val_sequences |
List[Tuple[pd.DataFrame, float]]
|
List of validation sequences. |
required |
test_sequences |
List[Tuple[pd.DataFrame, float]]
|
List of test sequences. |
required |
train_batch_size |
int
|
Batch size for training. |
required |
val_batch_size |
int
|
Batch size for validation. |
required |
train_workers |
int
|
Number of workers for training. |
2
|
val_workers |
int
|
Number of workers for validation. |
1
|
Source code in make_us_rich/pipelines/training/dataloader.py
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 51 |
|
setup(stage=None)
Load the data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stage |
str
|
Name of the stage. |
None
|
Source code in make_us_rich/pipelines/training/dataloader.py
54 55 56 57 58 59 60 61 62 63 64 65 |
|
test_dataloader()
Return the test data loader.
Source code in make_us_rich/pipelines/training/dataloader.py
88 89 90 91 92 93 94 95 |
|
train_dataloader()
Return the training data loader.
Source code in make_us_rich/pipelines/training/dataloader.py
68 69 70 71 72 73 74 75 |
|
val_dataloader()
Return the validation data loader.
Source code in make_us_rich/pipelines/training/dataloader.py
78 79 80 81 82 83 84 85 |
|
Last update:
2022-05-04