graphorge.gnn_base_model.train.training.save_loss_history¶
- save_loss_history(model, n_max_epochs, loss_nature, loss_type, training_loss_history, lr_scheduler_type=None, lr_history_epochs=None, validation_loss_history=None)[source]¶
Save training process loss history record.
Loss history record file is stored in model_directory under the name loss_history_record.pkl.
Overwrites existing loss history record file.
- Parameters:
model (torch.nn.Module) – Model.
n_max_epochs (int) – Maximum number of epochs of training process.
loss_nature (str) – Loss nature.
loss_type (str) – Loss function type.
training_loss_history (list[float]) – Training process training loss history (per epoch).
lr_scheduler_type ({'steplr', 'explr', 'linlr'}, default=None) – Type of learning rate scheduler.
lr_history_epochs (list[float], default=None) – Training process learning rate history (per epoch).
validation_loss_history (list[float], default=None) – Training process validation loss history (e.g., early stopping criterion).