Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
ce55c4f1
Commit
ce55c4f1
authored
Dec 18, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filled out some assert error messages and the spec file.
parent
fb5ae486
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
svm_c_linear_dcd_trainer.h
dlib/svm/svm_c_linear_dcd_trainer.h
+27
-4
svm_c_linear_dcd_trainer_abstract.h
dlib/svm/svm_c_linear_dcd_trainer_abstract.h
+0
-0
No files found.
dlib/svm/svm_c_linear_dcd_trainer.h
View file @
ce55c4f1
...
...
@@ -233,10 +233,28 @@ namespace dlib
if
(
did_init
)
{
DLIB_CASSERT
(
have_bias_
==
have_bias
&&
last_weight_1_
==
last_weight_1
,
""
);
last_weight_1_
==
last_weight_1
,
"
\t
decision_function svm_c_linear_dcd_trainer::train(x,y,state)"
<<
"
\n\t
The given state object is invalid because the previous trainer was configured differently."
<<
"
\n\t
have_bias_: "
<<
have_bias_
<<
"
\n\t
have_bias: "
<<
have_bias
<<
"
\n\t
last_weight_1_: "
<<
last_weight_1_
<<
"
\n\t
last_weight_1: "
<<
last_weight_1
);
DLIB_CASSERT
(
new_dims
>=
dims
,
"
\t
decision_function svm_c_linear_dcd_trainer::train(x,y,state)"
<<
"
\n\t
The given state object is invalid because the training data dimensions have shrunk."
<<
"
\n\t
new_dims: "
<<
new_dims
<<
"
\n\t
dims: "
<<
dims
);
DLIB_CASSERT
(
new_dims
>=
dims
,
""
);
DLIB_CASSERT
(
x
.
size
()
>=
static_cast
<
long
>
(
alpha
.
size
()),
""
);
DLIB_CASSERT
(
x
.
size
()
>=
static_cast
<
long
>
(
alpha
.
size
()),
"
\t
decision_function svm_c_linear_dcd_trainer::train(x,y,state)"
<<
"
\n\t
The given state object is invalid because the training data has fewer samples than previously."
<<
"
\n\t
x.size(): "
<<
x
.
size
()
<<
"
\n\t
alpha.size(): "
<<
alpha
.
size
()
);
// make sure we amortize the cost of growing the alpha vector.
if
(
alpha
.
capacity
()
<
static_cast
<
unsigned
long
>
(
x
.
size
()))
...
...
@@ -258,7 +276,12 @@ namespace dlib
// have given too low of a result. But for dense vectors it is
// definitely a user error if the dimensions don't match.
DLIB_CASSERT
(
is_matrix
<
sample_type
>::
value
==
false
,
""
);
DLIB_CASSERT
(
is_matrix
<
sample_type
>::
value
==
false
,
"
\t
decision_function svm_c_linear_dcd_trainer::train(x,y,state)"
<<
"
\n\t
The given state object is invalid because the training data dimensions have changed."
<<
"
\n\t
new_dims: "
<<
new_dims
<<
"
\n\t
dims: "
<<
dims
);
// extend w by the right number of elements
if
(
have_bias
)
...
...
dlib/svm/svm_c_linear_dcd_trainer_abstract.h
View file @
ce55c4f1
This diff is collapsed.
Click to expand it.
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