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
a4c5983a
Commit
a4c5983a
authored
Dec 12, 2015
by
Davis King
Browse files
Improved softmax tests
parent
0a832e42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
dlib/test/dnn.cpp
dlib/test/dnn.cpp
+6
-4
No files found.
dlib/test/dnn.cpp
View file @
a4c5983a
...
...
@@ -114,10 +114,12 @@ namespace
void
test_softmax
()
{
print_spinner
();
resizable_tensor
src
(
5
,
5
),
dest
(
5
,
5
),
gradient_input
(
5
,
5
);
src
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
,
0
));
dest
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
,
1
));
gradient_input
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
,
2
));
const
long
nr
=
3
;
const
long
nc
=
3
;
resizable_tensor
src
(
5
,
5
,
nr
,
nr
),
dest
(
5
,
5
,
nr
,
nc
),
gradient_input
(
5
,
5
,
nr
,
nc
);
src
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
*
nr
*
nc
,
0
));
dest
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
*
nr
*
nc
,
1
));
gradient_input
=
matrix_cast
<
float
>
(
gaussian_randm
(
5
,
5
*
nr
*
nc
,
2
));
...
...
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