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
1291350f
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "3a17775454b80d2b0bceb0de7ac6b444ff288c75"
Commit
1291350f
authored
Dec 03, 2011
by
Davis King
Browse files
Added a missing assert.
parent
dab7db37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
dlib/svm/structural_svm_sequence_labeling_problem.h
dlib/svm/structural_svm_sequence_labeling_problem.h
+28
-0
No files found.
dlib/svm/structural_svm_sequence_labeling_problem.h
View file @
1291350f
...
...
@@ -84,6 +84,34 @@ namespace dlib
labels
(
labels_
),
fe
(
fe_
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
is_sequence_labeling_problem
(
samples
,
labels
)
==
true
,
"
\t
structural_svm_sequence_labeling_problem::structural_svm_sequence_labeling_problem()"
<<
"
\n\t
invalid inputs were given to this function"
<<
"
\n\t
samples.size(): "
<<
samples
.
size
()
<<
"
\n\t
is_sequence_labeling_problem(samples,labels): "
<<
is_sequence_labeling_problem
(
samples
,
labels
)
<<
"
\n\t
this: "
<<
this
);
#ifdef ENABLE_ASSERTS
for
(
unsigned
long
i
=
0
;
i
<
labels
.
size
();
++
i
)
{
for
(
unsigned
long
j
=
0
;
j
<
labels
[
i
].
size
();
++
j
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
labels
[
i
][
j
]
<
fe
.
num_labels
(),
"
\t
structural_svm_sequence_labeling_problem::structural_svm_sequence_labeling_problem()"
<<
"
\n\t
The given labels in labels are invalid."
<<
"
\n\t
labels[i][j]: "
<<
labels
[
i
][
j
]
<<
"
\n\t
fe.num_labels(): "
<<
fe
.
num_labels
()
<<
"
\n\t
i: "
<<
i
<<
"
\n\t
j: "
<<
j
<<
"
\n\t
this: "
<<
this
);
}
}
#endif
}
private:
...
...
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