lightning
LightningLearner(module, num_workers=None, batch_size=32, max_epochs=100)
Bases: SupervisedLearner
A learner that uses PyTorch Lightning.
Initialize the learner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module
|
LightningModule
|
The PyTorch Lightning module. |
required |
num_workers
|
int | None
|
The number of workers to use for the DataLoader. |
None
|
batch_size
|
int
|
The batch size to use for training. |
32
|
max_epochs
|
int
|
The maximum number of epochs to train for. |
100
|
Source code in src/flowcean/learners/lightning.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
MultilayerPerceptron(learning_rate, input_size, output_size, hidden_dimensions=None)
Bases: LightningModule
A multilayer perceptron.
Initialize the model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
learning_rate
|
float
|
The learning rate. |
required |
input_size
|
int
|
The size of the input. |
required |
output_size
|
int
|
The size of the output. |
required |
hidden_dimensions
|
list[int] | None
|
The dimensions of the hidden layers. |
None
|
Source code in src/flowcean/learners/lightning.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|