dgs.models.engine.visual_sim_engine.VisualSimilarityEngine.save_model

VisualSimilarityEngine.save_model(epoch: int, metrics: dict[str, any], optimizer: torch.optim.Optimizer, lr_sched: torch.optim.lr_scheduler.LRScheduler) None

Save the current model and other weights into a ‘.pth’ file.

Parameters:
  • epoch – The epoch this model is saved.

  • metrics – A dict containing the computed metrics for this module.

  • optimizer – The current optimizer

  • lr_sched – The current learning rate scheduler.