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
3400e163
"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "563e409cc165ed046c89402e45405649ecb85011"
Commit
3400e163
authored
Jul 26, 2020
by
Davis King
Browse files
tweaked cca test thresholds to avoid false positives
parent
943408d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dlib/test/cca.cpp
dlib/test/cca.cpp
+3
-3
No files found.
dlib/test/cca.cpp
View file @
3400e163
...
@@ -237,7 +237,7 @@ namespace
...
@@ -237,7 +237,7 @@ namespace
// non-matching pairs of projections.
// non-matching pairs of projections.
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
2
e-
9
);
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1
e-
7
);
}
}
// Matching projection directions should be correlated with the amount of
// Matching projection directions should be correlated with the amount of
// correlation indicated by the return value of cca().
// correlation indicated by the return value of cca().
...
@@ -305,7 +305,7 @@ namespace
...
@@ -305,7 +305,7 @@ namespace
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
v
)
*
v
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
v
)
*
v
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
tmp
(
A
-
u
*
diagm
(
w
)
*
trans
(
v
))))
<
1e-1
3
);
DLIB_TEST
(
max
(
abs
(
tmp
(
A
-
u
*
diagm
(
w
)
*
trans
(
v
))))
<
1e-1
1
);
svd_fast
(
mat_to_sparse
(
A
),
u
,
w
,
v
,
rank
,
2
);
svd_fast
(
mat_to_sparse
(
A
),
u
,
w
,
v
,
rank
,
2
);
DLIB_TEST
(
u
.
nr
()
==
m
);
DLIB_TEST
(
u
.
nr
()
==
m
);
DLIB_TEST
(
u
.
nc
()
==
rank
);
DLIB_TEST
(
u
.
nc
()
==
rank
);
...
@@ -336,7 +336,7 @@ namespace
...
@@ -336,7 +336,7 @@ namespace
DLIB_TEST
(
v
.
nc
()
==
rank
);
DLIB_TEST
(
v
.
nc
()
==
rank
);
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
v
)
*
v
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
v
)
*
v
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
tmp
(
A
-
u
*
diagm
(
w
)
*
trans
(
v
))))
<
1e-
10
);
DLIB_TEST
(
max
(
abs
(
tmp
(
A
-
u
*
diagm
(
w
)
*
trans
(
v
))))
<
1e-
9
);
svd_fast
(
A
,
u
,
w
,
v
,
rank
+
5
,
0
);
svd_fast
(
A
,
u
,
w
,
v
,
rank
+
5
,
0
);
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
DLIB_TEST
(
max
(
abs
(
trans
(
u
)
*
u
-
identity_matrix
<
double
>
(
u
.
nc
())))
<
1e-13
);
...
...
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