How to return a final training loss value?

4 vues (au cours des 30 derniers jours)
Sho Wright
Sho Wright le 6 Avr 2021
Réponse apportée : Lokesh le 13 Oct 2023
I want to evaluate the results of my network at various settings (changing batch size, maximum epochs, dropout layer rates,etc).
I've set my 'verbose' to true to extract data as to obtain mini-batch and validation RMSE/loss data per epoch, and I want to compare my final validation loss against my final training loss, as from what I know these can be compared to see if your network has resulted in underfitting, overfitting or optimally.
I have used 'info' to return my final results but the training loss is stated as a single column
Is there any way to get a final training loss, the same way I have a final validation loss and RMSE?
Thank you

Réponses (1)

Lokesh
Lokesh le 13 Oct 2023
Hi Wright,
I understand that you want to obtain the value of the final training loss. However, ‘info.TrainingLoss’ consists of a column of values rather than a single value.
The ‘info.TrainingLoss’ variable contains a column of values, where each element corresponds to the loss for a particular iteration. For example, ‘info.TrainingLoss(1)’ corresponds to the training loss for the first iteration, ‘info.TrainingLoss(2)’ corresponds to the training loss for the second iteration, and so on. By accessing ‘info.TrainingLoss(end)’, you can retrieve the value of the final training loss.
I hope you find this helpful.
Best Regards,
Lokesh

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by