baseline_supervised
Supervised pytorch lightning models with an encoder and a supervised measurement to predict scores
ENC_M
ENC_M(
datamodule, encoder, measurement, optimizer, loss_function, scheduler = None
)
Supervised pytorch lightning model with an encoder and a measurement/prediction model
Args
- datamodule : pytorch lightning datamodule with sequences and labels
- encoder : encoder model
- measurement : measurement model (options: Linear, General Epistasis Model)
- optimizer : optimizer
- loss_function : loss function model( options: )
- scheduler : scheduler
Attributes
- dataset : pytorch lightning datamodule
- encoder : encoder model
- measurement : measurement model
- optimizer : optimizer
- loss_function : loss function
- scheduler : scheduler
- optimizer_params : optimizer parameters
- scheduler_params : scheduler parameters
Methods:
.factory
.factory(
cls, datamodule, **kwargs
)
.configure_optimizers
.configure_optimizers()
Configure the optimizer.
.forward
.forward(
x
)
.step_loss
.step_loss(
batch
)
.training_step
.training_step(
batch, batch_idx
)
.validation_step
.validation_step(
batch, batch_idx
)
.test_step
.test_step(
batch, batch_idx
)
.predict_step
.predict_step(
batch, batch_idx
)