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
89bfb786
Commit
89bfb786
authored
Jun 07, 2018
by
Davis King
Browse files
Fixed be_verbose not doing the right thing.
parent
0fe68bb5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
dlib/svm/auto.cpp
dlib/svm/auto.cpp
+10
-4
No files found.
dlib/svm/auto.cpp
View file @
89bfb786
...
...
@@ -70,6 +70,7 @@ namespace dlib
};
if
(
be_verbose
)
std
::
cout
<<
"Searching for best RBF-SVM training parameters..."
<<
std
::
endl
;
auto
result
=
find_max_global
(
default_thread_pool
(),
...
...
@@ -82,15 +83,20 @@ namespace dlib
double
best_c1
=
result
.
x
(
1
);
double
best_c2
=
result
.
x
(
2
);
if
(
be_verbose
)
{
std
::
cout
<<
" best cross-validation score: "
<<
result
.
y
<<
std
::
endl
;
std
::
cout
<<
" best gamma: "
<<
best_gamma
<<
" best c1: "
<<
best_c1
<<
" best c2: "
<<
best_c2
<<
std
::
endl
;
}
svm_c_trainer
<
kernel_type
>
trainer
;
trainer
.
set_kernel
(
kernel_type
(
best_gamma
));
trainer
.
set_c_class1
(
best_c1
);
trainer
.
set_c_class2
(
best_c2
);
if
(
be_verbose
)
std
::
cout
<<
"Training final classifier with best parameters..."
<<
std
::
endl
;
df
.
function
=
trainer
.
train
(
x
,
y
);
return
df
;
...
...
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