dgs.models.engine.visual_sim_engine.VisualSimilarityEngine.train_model

VisualSimilarityEngine.train_model() torch.optim.Optimizer

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.