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
7b35d7b2
Commit
7b35d7b2
authored
Mar 10, 2020
by
Davis King
Browse files
removed inappropriate assert
parent
e7087e59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
dlib/cuda/tensor_tools.cpp
dlib/cuda/tensor_tools.cpp
+0
-1
dlib/test/dnn.cpp
dlib/test/dnn.cpp
+14
-0
No files found.
dlib/cuda/tensor_tools.cpp
View file @
7b35d7b2
...
...
@@ -102,7 +102,6 @@ namespace dlib { namespace tt
#ifdef DLIB_USE_CUDA
cuda
::
scale_columns
(
out
,
m
,
v
);
#else
DLIB_CASSERT
(
false
,
"shouldn't be called right now"
);
out
=
scale_columns
(
mat
(
m
),
mat
(
v
));
#endif
}
...
...
dlib/test/dnn.cpp
View file @
7b35d7b2
...
...
@@ -597,6 +597,20 @@ namespace
#endif
}
{
const
int
nr
=
5
;
const
int
nc
=
6
;
tensor_rand
rnd
;
resizable_tensor
out1
(
nr
,
nc
),
m
(
nr
,
nc
),
v
(
nc
),
out2
;
rnd
.
fill_uniform
(
out1
);
rnd
.
fill_uniform
(
m
);
rnd
.
fill_uniform
(
v
);
tt
::
scale_columns
(
out1
,
m
,
v
);
out2
=
scale_columns
(
mat
(
m
),
mat
(
v
));
DLIB_TEST
(
max
(
abs
(
mat
(
out1
)
-
mat
(
out2
)))
<
1e-6
);
}
{
resizable_tensor
A
,
B
;
A
.
set_size
(
11
);
...
...
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