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
e4998c13
Commit
e4998c13
authored
Jan 08, 2020
by
Juha Reunanen
Committed by
Davis E. King
Jan 07, 2020
Browse files
Add sanity check (#1964)
parent
b817bc1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
dlib/dnn/trainer.h
dlib/dnn/trainer.h
+4
-0
No files found.
dlib/dnn/trainer.h
View file @
e4998c13
...
@@ -1113,6 +1113,10 @@ namespace dlib
...
@@ -1113,6 +1113,10 @@ namespace dlib
if
(
gradient_updates_since_last_sync
<
30
)
if
(
gradient_updates_since_last_sync
<
30
)
return
false
;
return
false
;
// if learning rate was changed from outside during training, for example
if
(
g
.
current_n
()
<=
2
)
return
false
;
// if the loss is very likely to be increasing then return true
// if the loss is very likely to be increasing then return true
const
double
prob
=
g
.
probability_gradient_greater_than
(
0
);
const
double
prob
=
g
.
probability_gradient_greater_than
(
0
);
if
(
prob
>
prob_loss_increasing_thresh
)
if
(
prob
>
prob_loss_increasing_thresh
)
...
...
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