Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
97c1f099
Commit
97c1f099
authored
Mar 02, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10955 from pengli:dnn
parents
ec0bb66e
ef937dd6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
4 deletions
+11
-4
convolution_layer.cpp
modules/dnn/src/layers/convolution_layer.cpp
+0
-3
ocl4dnn.hpp
modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp
+2
-0
ocl4dnn_conv_spatial.cpp
modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp
+8
-0
conv_layer_spatial.cl
modules/dnn/src/opencl/conv_layer_spatial.cl
+0
-0
test_tf_importer.cpp
modules/dnn/test/test_tf_importer.cpp
+1
-1
No files found.
modules/dnn/src/layers/convolution_layer.cpp
View file @
97c1f099
...
...
@@ -824,9 +824,6 @@ public:
for
(
int
i
=
0
;
i
<
inputs
.
size
();
++
i
)
CV_Assert
(
inputs
[
i
].
u
!=
outputs
[
0
].
u
);
if
(
padMode
==
"SAME"
)
return
false
;
if
(
convolutionOp
.
empty
())
{
OCL4DNNConvConfig
config
;
...
...
modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp
View file @
97c1f099
...
...
@@ -285,6 +285,8 @@ class OCL4DNNConvSpatial
int32_t
width_
;
int32_t
pad_h_
;
int32_t
pad_w_
;
int32_t
pad_bottom_
;
int32_t
pad_right_
;
int32_t
stride_h_
;
int32_t
stride_w_
;
int32_t
dilation_h_
;
...
...
modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp
View file @
97c1f099
...
...
@@ -103,6 +103,12 @@ OCL4DNNConvSpatial<Dtype>::OCL4DNNConvSpatial(OCL4DNNConvConfig config)
output_w_
=
config
.
out_shape
[
dims
-
spatial_dims
+
1
];
bottom_dim_
=
channels_
*
width_
*
height_
;
top_dim_
=
num_output_
*
output_w_
*
output_h_
;
int
Ph
=
(
output_h_
-
1
)
*
stride_h_
+
(
dilation_h_
*
(
kernel_h_
-
1
)
+
1
)
-
height_
;
int
Pw
=
(
output_w_
-
1
)
*
stride_w_
+
(
dilation_w_
*
(
kernel_w_
-
1
)
+
1
)
-
width_
;
Ph
=
(
Ph
>
0
)
?
Ph
:
0
;
Pw
=
(
Pw
>
0
)
?
Pw
:
0
;
pad_right_
=
(
Pw
+
1
)
/
2
;
pad_bottom_
=
(
Ph
+
1
)
/
2
;
cache_path_
=
utils
::
getConfigurationParameterString
(
"OPENCV_OCL4DNN_CONFIG_PATH"
,
""
);
dwconv_
=
(
num_output_
==
channels_
&&
channels_
==
group_
);
...
...
@@ -379,6 +385,8 @@ void OCL4DNNConvSpatial<Dtype>::setupKernel()
{
addDef
(
"INPUT_PAD_W"
,
pad_w_
);
addDef
(
"INPUT_PAD_H"
,
pad_h_
);
addDef
(
"INPUT_PAD_RIGHT"
,
pad_right_
);
addDef
(
"INPUT_PAD_BOTTOM"
,
pad_bottom_
);
}
setupKernelDetails
(
kernelType_
,
blockM_
,
blockK_
,
blockN_
);
...
...
modules/dnn/src/opencl/conv_layer_spatial.cl
View file @
97c1f099
This diff is collapsed.
Click to expand it.
modules/dnn/test/test_tf_importer.cpp
View file @
97c1f099
...
...
@@ -321,7 +321,7 @@ OCL_TEST(Test_TensorFlow, MobileNet_SSD)
std
::
vector
<
Mat
>
output
;
net
.
forward
(
output
,
outNames
);
normAssert
(
target
[
0
].
reshape
(
1
,
1
),
output
[
0
].
reshape
(
1
,
1
));
normAssert
(
target
[
0
].
reshape
(
1
,
1
),
output
[
0
].
reshape
(
1
,
1
)
,
""
,
1e-5
,
1.5e-4
);
normAssert
(
target
[
1
].
reshape
(
1
,
1
),
output
[
1
].
reshape
(
1
,
1
),
""
,
1e-5
,
3e-4
);
normAssert
(
target
[
2
].
reshape
(
1
,
1
),
output
[
2
].
reshape
(
1
,
1
),
""
,
4e-5
,
1e-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