tirank.Visualization.plot_loss
- tirank.Visualization.plot_loss(train_loss_dict, savePath='./loss_on_epoch.png')[source]
Plots and saves the training loss curves over epochs.
This function takes a dictionary of loss values recorded at each epoch, plots the trends for each loss type on a single graph, and saves the plot to a file.
- Parameters:
train_loss_dict (dict) – A dictionary where keys are epoch identifiers (e.g., ‘Epoch_1’) and values are dictionaries mapping loss names (e.g., ‘total_loss’) to their numerical values.
savePath (str, optional) – The file path to save the resulting loss plot. Defaults to “./loss_on_epoch.png”.
- Returns:
None