dgs.models.engine.engine.EngineModule.train_model

EngineModule.train_model() torch.optim.Optimizer[source]

Train the given model using the given loss function, optimizer, and learning-rate schedulers.

After every epoch, the current model is tested and the current model is saved.

Returns:

The current optimizer after training.