Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
04a8f009
Commit
04a8f009
authored
Oct 22, 2017
by
Davis King
Browse files
Make sure the test loss the trainer logs to the console never gets suck at
infinity.
parent
261f12d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
dlib/dnn/trainer.h
dlib/dnn/trainer.h
+2
-1
No files found.
dlib/dnn/trainer.h
View file @
04a8f009
...
@@ -584,7 +584,8 @@ namespace dlib
...
@@ -584,7 +584,8 @@ namespace dlib
void
record_test_loss
(
double
loss
)
void
record_test_loss
(
double
loss
)
{
{
test_previous_loss_values
.
push_back
(
loss
);
test_previous_loss_values
.
push_back
(
loss
);
rs_test
.
add
(
loss
);
if
(
is_finite
(
loss
))
rs_test
.
add
(
loss
);
// discard really old loss values.
// discard really old loss values.
while
(
test_previous_loss_values
.
size
()
>
test_iter_without_progress_thresh
)
while
(
test_previous_loss_values
.
size
()
>
test_iter_without_progress_thresh
)
test_previous_loss_values
.
pop_front
();
test_previous_loss_values
.
pop_front
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment