Skip to content

baseline_supervised

Supervised pytorch lightning models with an encoder and a supervised measurement to predict scores

ENC_M

source

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

source

.factory(
   cls, datamodule, **kwargs
)

.configure_optimizers

source

.configure_optimizers()

Configure the optimizer.

.forward

source

.forward(
   x
)

.step_loss

source

.step_loss(
   batch
)

.training_step

source

.training_step(
   batch, batch_idx
)

.validation_step

source

.validation_step(
   batch, batch_idx
)

.test_step

source

.test_step(
   batch, batch_idx
)

.predict_step

source

.predict_step(
   batch, batch_idx
)