EMCqMRI.core.engine.train_model module

class EMCqMRI.core.engine.train_model.Trainer(device=[], max_epochs=[], train_data_loader=[], network=[], optimizer=[], loss_function=[], prepare_batch=[], log_training_fun=[], config_object=[])[source]

Bases: object

Performs a forward pass through a given inference model.

Depending on the options set, it might save intermediate results and training checkpoints and/or display the intermediate results.

Parameters
  • ([type (config_object) – Configuration]): [Object containing all backend configuration settings]

  • config_object.args (Required) –

    • epochs

    • inference_model

    • dataloader

    • signal_model (if config_object.args.inference_model.__require_initial_guess__ == True)

    • numberOfPatches

    • objective_fun

    • optimizer

    • saveResults

    • saveResultsPath

    • saveCheckpoint

    • saveCheckpointPath

    • usePatchesAsBatches

run()[source]