Commit 04a8f009 authored by Davis King's avatar Davis King

Make sure the test loss the trainer logs to the console never gets suck at

infinity.
parent 261f12d4
......@@ -584,6 +584,7 @@ namespace dlib
void record_test_loss(double loss)
{
test_previous_loss_values.push_back(loss);
if (is_finite(loss))
rs_test.add(loss);
// discard really old loss values.
while (test_previous_loss_values.size() > test_iter_without_progress_thresh)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment