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
835e0bd8
Commit
835e0bd8
authored
May 02, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed test_ranking_function() and cross_validate_ranking_trainer() slightly
to avoid a run time error in gcc 4.7.
parent
967cd822
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ranking_tools.h
dlib/svm/ranking_tools.h
+1
-1
ranking.cpp
dlib/test/ranking.cpp
+4
-0
No files found.
dlib/svm/ranking_tools.h
View file @
835e0bd8
...
...
@@ -227,7 +227,7 @@ namespace dlib
return
true
;
else
if
(
a
.
first
>
b
.
first
)
return
false
;
else
if
(
a
.
second
==
true
)
else
if
(
a
.
second
&&
!
b
.
second
)
return
true
;
else
return
false
;
...
...
dlib/test/ranking.cpp
View file @
835e0bd8
...
...
@@ -144,6 +144,10 @@ namespace
samples
.
push_back
(
p
);
dlog
<<
LINFO
<<
"cv-accuracy: "
<<
cross_validate_ranking_trainer
(
trainer
,
samples
,
4
);
DLIB_TEST
(
equal
(
cross_validate_ranking_trainer
(
trainer
,
samples
,
4
)
,
res
));
df
.
basis_vectors
(
0
)
=
0
;
dlog
<<
LINFO
<<
"BAD RANKING:"
<<
test_ranking_function
(
df
,
samples
);
DLIB_TEST
(
test_ranking_function
(
df
,
samples
)(
1
)
<
0.5
);
}
// ----------------------------------------------------------------------------------------
...
...
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