trainNetwork: loss output vs. manual calculation

2 visualizzazioni (ultimi 30 giorni)
Roland Kruse
Roland Kruse il 18 Gen 2021
Modificato: Roland Kruse il 18 Gen 2021
Dear Matlab community,
I have recently become a bit puzzled when it comes to the trainNetwork function, specifically the diagnostis printed.
I get the following values during the last epoch:
|======================================================================================================================|
| Epoch | Iteration | Time Elapsed | Mini-batch | Validation | Mini-batch | Validation | Base Learning |
| | | (hh:mm:ss) | RMSE | RMSE | Loss | Loss | Rate |
|======================================================================================================================|
| 1000 | 252750 | 12:58:24 | 0.04 | 0.17 | 0.0007 | 0.0136 | 6.2500e-05 |
| 1000 | 252800 | 12:58:34 | 0.03 | 0.16 | 0.0006 | 0.0120 | 6.2500e-05 |
| 1000 | 252850 | 12:58:43 | 0.04 | 0.16 | 0.0007 | 0.0133 | 6.2500e-05 |
| 1000 | 252900 | 12:58:52 | 0.03 | 0.17 | 0.0004 | 0.0143 | 6.2500e-05 |
| 1000 | 252950 | 12:59:01 | 0.03 | 0.16 | 0.0005 | 0.0121 | 6.2500e-05 |
| 1000 | 253000 | 12:59:11 | 0.03 | 0.17 | 0.0004 | 0.0150 | 6.2500e-05 |
One observes that the training loss is much lower than the validation loss, sign of overtraining but not the issue here.
If I now use the trained network, predict the responses and calculate the loss manually I receive:
training: 0.137 / validation: 0.149
This is systematic and leads me to wonder if the "Mini-batch Loss" is not the MSE of the training data.

Risposte (0)

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by