cellflow.training.CellFlowTrainer

class cellflow.training.CellFlowTrainer(solver, predict_kwargs=None, seed=0)[source]

Trainer for the OTFM/GENOT solver with a conditional velocity field.

Parameters:
  • dataloader – Data sampler.

  • solver (OTFlowMatching | GENOT) – OTFlowMatching or GENOT solver with a conditional velocity field.

  • predict_kwargs (dict[str, Any] | None) – Keyword arguments for the prediction functions cellflow.solvers._otfm.OTFlowMatching.predict() or cellflow.solvers._genot.GENOT.predict() used during validation.

  • seed (int) – Random seed for subsampling validation data.

Returns:

None

Methods

train(dataloader, num_iterations, valid_freq)

Trains the model.