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
fe42f662
Commit
fe42f662
authored
Aug 24, 2016
by
Davis King
Browse files
Slightly adjusted some of the unit tests to avoid false failures in some
environments.
parent
7999f6da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
dlib/test/correlation_tracker.cpp
dlib/test/correlation_tracker.cpp
+1
-1
dlib/test/matrix2.cpp
dlib/test/matrix2.cpp
+1
-1
dlib/test/oca.cpp
dlib/test/oca.cpp
+2
-2
dlib/test/optimization.cpp
dlib/test/optimization.cpp
+3
-3
No files found.
dlib/test/correlation_tracker.cpp
View file @
fe42f662
...
@@ -77,7 +77,7 @@ namespace
...
@@ -77,7 +77,7 @@ namespace
// small error possible due to rounding and different optimization options
// small error possible due to rounding and different optimization options
DLIB_TEST
(
res_diff
<=
1
);
DLIB_TEST
(
res_diff
<=
1
);
DLIB_TEST
(
rect_confidence
>=
0.9
8
);
DLIB_TEST
(
rect_confidence
>=
0.9
7
);
print_spinner
();
print_spinner
();
}
}
}
}
...
...
dlib/test/matrix2.cpp
View file @
fe42f662
...
@@ -1122,7 +1122,7 @@ namespace
...
@@ -1122,7 +1122,7 @@ namespace
DLIB_TEST
(
max
(
abs
(
m1
*
inv
(
m1
)
-
identity_matrix
(
m1
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m1
*
inv
(
m1
)
-
identity_matrix
(
m1
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m2
*
inv
(
m2
)
-
identity_matrix
(
m2
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m2
*
inv
(
m2
)
-
identity_matrix
(
m2
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m3
*
inv
(
m3
)
-
identity_matrix
(
m3
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m3
*
inv
(
m3
)
-
identity_matrix
(
m3
)))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
m4
*
inv
(
m4
)
-
identity_matrix
(
m4
)))
<
1e-1
3
);
DLIB_TEST
_MSG
(
max
(
abs
(
m4
*
inv
(
m4
)
-
identity_matrix
(
m4
)))
<
1e-1
2
,
max
(
abs
(
m4
*
inv
(
m4
)
-
identity_matrix
(
m4
)))
);
}
}
}
}
...
...
dlib/test/oca.cpp
View file @
fe42f662
...
@@ -128,7 +128,7 @@ namespace
...
@@ -128,7 +128,7 @@ namespace
w
=
join_cols
(
df
.
basis_vectors
(
0
),
uniform_matrix
<
double
>
(
1
,
1
,
-
df
.
b
));
w
=
join_cols
(
df
.
basis_vectors
(
0
),
uniform_matrix
<
double
>
(
1
,
1
,
-
df
.
b
));
true_w
=
0
,
1
,
0
;
true_w
=
0
,
1
,
0
;
dlog
<<
LINFO
<<
"error: "
<<
max
(
abs
(
w
-
true_w
));
dlog
<<
LINFO
<<
"error: "
<<
max
(
abs
(
w
-
true_w
));
DLIB_TEST
(
max
(
abs
(
w
-
true_w
))
<
1e-
10
);
DLIB_TEST
_MSG
(
max
(
abs
(
w
-
true_w
))
<
1e-
9
,
max
(
abs
(
w
-
true_w
))
);
print_spinner
();
print_spinner
();
...
@@ -193,7 +193,7 @@ namespace
...
@@ -193,7 +193,7 @@ namespace
w
=
join_cols
(
df
.
basis_vectors
(
0
),
uniform_matrix
<
double
>
(
1
,
1
,
-
df
.
b
));
w
=
join_cols
(
df
.
basis_vectors
(
0
),
uniform_matrix
<
double
>
(
1
,
1
,
-
df
.
b
));
true_w
=
1
,
0
,
0
;
true_w
=
1
,
0
,
0
;
dlog
<<
LINFO
<<
"error: "
<<
max
(
abs
(
w
-
true_w
));
dlog
<<
LINFO
<<
"error: "
<<
max
(
abs
(
w
-
true_w
));
DLIB_TEST
(
max
(
abs
(
w
-
true_w
))
<
1e-
10
);
DLIB_TEST
_MSG
(
max
(
abs
(
w
-
true_w
))
<
1e-
9
,
max
(
abs
(
w
-
true_w
))
);
...
...
dlib/test/optimization.cpp
View file @
fe42f662
...
@@ -372,7 +372,7 @@ namespace
...
@@ -372,7 +372,7 @@ namespace
uniform_matrix
<
double
>
(
x
.
size
(),
1
,
-
1e100
),
uniform_matrix
<
double
>
(
x
.
size
(),
1
,
-
1e100
),
uniform_matrix
<
double
>
(
x
.
size
(),
1
,
1e100
),
uniform_matrix
<
double
>
(
x
.
size
(),
1
,
1e100
),
(
max
(
abs
(
x
))
+
1
)
/
10
,
(
max
(
abs
(
x
))
+
1
)
/
10
,
1e-
7
,
1e-
8
,
10000
);
10000
);
DLIB_TEST_MSG
(
dlib
::
equal
(
x
,
opt
,
1e-3
),
opt
-
x
);
DLIB_TEST_MSG
(
dlib
::
equal
(
x
,
opt
,
1e-3
),
opt
-
x
);
DLIB_TEST
(
approx_equal
(
val
,
powell
(
x
)));
DLIB_TEST
(
approx_equal
(
val
,
powell
(
x
)));
...
@@ -1151,8 +1151,8 @@ namespace
...
@@ -1151,8 +1151,8 @@ namespace
dlog
<<
LINFO
<<
"mean brown gradient: "
<<
rs
.
mean
();
dlog
<<
LINFO
<<
"mean brown gradient: "
<<
rs
.
mean
();
dlog
<<
LINFO
<<
"max brown gradient: "
<<
rs
.
max
();
dlog
<<
LINFO
<<
"max brown gradient: "
<<
rs
.
max
();
dlog
<<
LINFO
<<
"min brown gradient: "
<<
rs
.
min
();
dlog
<<
LINFO
<<
"min brown gradient: "
<<
rs
.
min
();
DLIB_TEST
(
rs
.
mean
()
<
1
e-5
);
DLIB_TEST
(
rs
.
mean
()
<
4
e-5
);
DLIB_TEST
(
rs
.
max
()
<
1
e-2
);
DLIB_TEST
_MSG
(
rs
.
max
()
<
3
e-2
,
rs
.
max
()
);
DLIB_TEST
(
rs
.
min
()
<
1e-10
);
DLIB_TEST
(
rs
.
min
()
<
1e-10
);
dlog
<<
LINFO
<<
"test find_max_box_constrained() on neg_rosen"
;
dlog
<<
LINFO
<<
"test find_max_box_constrained() on neg_rosen"
;
...
...
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