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
4d5249df
Commit
4d5249df
authored
Jan 05, 2014
by
Davis King
Browse files
Made the stopping condition for the structural svm solver a little more robust.
parent
20dde81b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dlib/svm/structural_svm_problem.h
dlib/svm/structural_svm_problem.h
+4
-2
No files found.
dlib/svm/structural_svm_problem.h
View file @
4d5249df
...
@@ -438,7 +438,8 @@ namespace dlib
...
@@ -438,7 +438,8 @@ namespace dlib
if
(
converged
)
if
(
converged
)
{
{
return
current_risk_gap
<
std
::
max
(
cache_based_eps
,
cache_based_eps
*
current_risk_value
);
return
(
current_risk_gap
<
std
::
max
(
cache_based_eps
,
cache_based_eps
*
current_risk_value
))
||
(
current_risk_gap
==
0
);
}
}
if
(
current_risk_gap
<
eps
)
if
(
current_risk_gap
<
eps
)
...
@@ -452,7 +453,8 @@ namespace dlib
...
@@ -452,7 +453,8 @@ namespace dlib
{
{
converged
=
true
;
converged
=
true
;
skip_cache
=
false
;
skip_cache
=
false
;
return
current_risk_gap
<
std
::
max
(
cache_based_eps
,
cache_based_eps
*
current_risk_value
);
return
(
current_risk_gap
<
std
::
max
(
cache_based_eps
,
cache_based_eps
*
current_risk_value
));
(
current_risk_gap
==
0
);
}
}
++
count_below_eps
;
++
count_below_eps
;
...
...
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