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
095d3e0c
"tests/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "8e552bb4fe33363762864c62a60d456b1cf1e973"
Commit
095d3e0c
authored
Aug 16, 2016
by
Davis King
Browse files
Fixed more compiler warnings
parent
51946baa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
dlib/dnn/cuda_dlib.cu
dlib/dnn/cuda_dlib.cu
+1
-1
dlib/dnn/cudnn_dlibapi.cpp
dlib/dnn/cudnn_dlibapi.cpp
+10
-11
No files found.
dlib/dnn/cuda_dlib.cu
View file @
095d3e0c
...
@@ -825,7 +825,7 @@ namespace dlib
...
@@ -825,7 +825,7 @@ namespace dlib
const
float
*
src_p
=
src
.
device
()
+
src_k_offset
*
src
.
nc
()
*
src
.
nr
();;
const
float
*
src_p
=
src
.
device
()
+
src_k_offset
*
src
.
nc
()
*
src
.
nr
();;
for
(
unsigned
long
i
=
0
;
i
<
src
.
num_samples
();
++
i
)
for
(
long
i
=
0
;
i
<
src
.
num_samples
();
++
i
)
{
{
CHECK_CUDA
(
cudaMemcpy
(
dest_p
,
src_p
,
block_size
*
sizeof
(
float
),
cudaMemcpyDeviceToDevice
));
CHECK_CUDA
(
cudaMemcpy
(
dest_p
,
src_p
,
block_size
*
sizeof
(
float
),
cudaMemcpyDeviceToDevice
));
...
...
dlib/dnn/cudnn_dlibapi.cpp
View file @
095d3e0c
...
@@ -488,11 +488,11 @@ namespace dlib
...
@@ -488,11 +488,11 @@ namespace dlib
{
{
const
long
num
=
src
.
k
()
*
src
.
nr
()
*
src
.
nc
();
const
long
num
=
src
.
k
()
*
src
.
nr
()
*
src
.
nc
();
DLIB_CASSERT
(
src
.
num_samples
()
>
1
,
""
);
DLIB_CASSERT
(
src
.
num_samples
()
>
1
,
""
);
DLIB_CASSERT
(
num
==
means
.
size
(),
""
);
DLIB_CASSERT
(
num
==
(
long
)
means
.
size
(),
""
);
DLIB_CASSERT
(
num
==
invstds
.
size
(),
""
);
DLIB_CASSERT
(
num
==
(
long
)
invstds
.
size
(),
""
);
DLIB_CASSERT
(
num
==
gamma
.
size
(),
""
);
DLIB_CASSERT
(
num
==
(
long
)
gamma
.
size
(),
""
);
DLIB_CASSERT
(
num
==
gamma_grad
.
size
(),
""
);
DLIB_CASSERT
(
num
==
(
long
)
gamma_grad
.
size
(),
""
);
DLIB_CASSERT
(
num
==
beta_grad
.
size
(),
""
);
DLIB_CASSERT
(
num
==
(
long
)
beta_grad
.
size
(),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src_grad
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src_grad
),
""
);
DLIB_CASSERT
(
eps
>
0
,
""
);
DLIB_CASSERT
(
eps
>
0
,
""
);
...
@@ -676,12 +676,11 @@ namespace dlib
...
@@ -676,12 +676,11 @@ namespace dlib
tensor
&
beta_grad
tensor
&
beta_grad
)
)
{
{
const
long
num
=
src
.
nr
()
*
src
.
nc
();
DLIB_CASSERT
(
src
.
k
()
==
(
long
)
means
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
means
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
(
long
)
invstds
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
invstds
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
(
long
)
gamma
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
gamma
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
(
long
)
gamma_grad
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
gamma_grad
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
(
long
)
beta_grad
.
size
(),
""
);
DLIB_CASSERT
(
src
.
k
()
==
beta_grad
.
size
(),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src_grad
),
""
);
DLIB_CASSERT
(
have_same_dimensions
(
gradient_input
,
src_grad
),
""
);
DLIB_CASSERT
(
eps
>
0
,
""
);
DLIB_CASSERT
(
eps
>
0
,
""
);
...
...
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