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
ceec4566
Commit
ceec4566
authored
Jan 06, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some checks that the user produces PSI vectors that are the proper
dimension.
parent
afa4fe0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
structural_svm_problem.h
dlib/svm/structural_svm_problem.h
+11
-0
No files found.
dlib/svm/structural_svm_problem.h
View file @
ceec4566
...
...
@@ -75,6 +75,12 @@ namespace dlib
psi
=
true_psi
;
else
prob
->
get_truth_joint_feature_vector
(
sample_idx
,
psi
);
if
(
is_matrix
<
feature_vector_type
>::
value
)
{
DLIB_CASSERT
(
psi
.
size
()
==
(
unsigned
long
)
prob
->
get_num_dimensions
(),
"The dimensionality of your PSI vector doesn't match get_num_dimensions()"
);
}
}
void
separation_oracle_cached
(
...
...
@@ -128,6 +134,11 @@ namespace dlib
prob
->
separation_oracle
(
sample_idx
,
current_solution
,
out_loss
,
out_psi
);
if
(
is_matrix
<
feature_vector_type
>::
value
)
{
DLIB_CASSERT
(
out_psi
.
size
()
==
(
unsigned
long
)
prob
->
get_num_dimensions
(),
"The dimensionality of your PSI vector doesn't match get_num_dimensions()"
);
}
if
(
!
cache_enabled
)
return
;
...
...
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