Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
4cbd09c4
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4cbd09c4
编写于
2月 21, 2019
作者:
D
Dmitry Kurtaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add extra limitations for LRN from Inference Engine backend
上级
1db5d82b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
10 deletion
+11
-10
modules/dnn/src/layers/lrn_layer.cpp
modules/dnn/src/layers/lrn_layer.cpp
+8
-5
modules/dnn/src/op_inf_engine.cpp
modules/dnn/src/op_inf_engine.cpp
+1
-1
modules/dnn/test/test_halide_layers.cpp
modules/dnn/test/test_halide_layers.cpp
+2
-4
未找到文件。
modules/dnn/src/layers/lrn_layer.cpp
浏览文件 @
4cbd09c4
...
...
@@ -90,9 +90,9 @@ public:
virtual
bool
supportBackend
(
int
backendId
)
CV_OVERRIDE
{
return
backendId
==
DNN_BACKEND_OPENCV
||
backendId
==
DNN_BACKEND_HALIDE
||
backendId
==
DNN_BACKEND_INFERENCE_ENGIN
E
;
if
(
backendId
==
DNN_BACKEND_INFERENCE_ENGINE
)
return
(
bias
==
1
)
&&
(
preferableTarget
!=
DNN_TARGET_MYRIAD
||
type
==
SPATIAL_NRM
);
return
backendId
==
DNN_BACKEND_OPENCV
||
backendId
==
DNN_BACKEND_HALID
E
;
}
#ifdef HAVE_OPENCL
...
...
@@ -382,10 +382,13 @@ public:
virtual
Ptr
<
BackendNode
>
initInfEngine
(
const
std
::
vector
<
Ptr
<
BackendWrapper
>
>&
)
CV_OVERRIDE
{
#ifdef HAVE_INF_ENGINE
float
alphaSize
=
alpha
;
if
(
!
normBySize
)
alphaSize
*=
(
type
==
SPATIAL_NRM
?
size
*
size
:
size
);
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2018R5)
InferenceEngine
::
Builder
::
NormLayer
ieLayer
(
name
);
ieLayer
.
setSize
(
size
);
ieLayer
.
setAlpha
(
alpha
);
ieLayer
.
setAlpha
(
alpha
Size
);
ieLayer
.
setBeta
(
beta
);
ieLayer
.
setAcrossMaps
(
type
==
CHANNEL_NRM
);
...
...
@@ -402,7 +405,7 @@ public:
ieLayer
->
_size
=
size
;
ieLayer
->
_k
=
(
int
)
bias
;
ieLayer
->
_beta
=
beta
;
ieLayer
->
_alpha
=
alpha
;
ieLayer
->
_alpha
=
alpha
Size
;
ieLayer
->
_isAcrossMaps
=
(
type
==
CHANNEL_NRM
);
return
Ptr
<
BackendNode
>
(
new
InfEngineBackendNode
(
ieLayer
));
#endif
...
...
modules/dnn/src/op_inf_engine.cpp
浏览文件 @
4cbd09c4
...
...
@@ -227,7 +227,7 @@ void InfEngineBackendNet::addLayer(InferenceEngine::Builder::Layer& layer)
// By default, all the weights are connected to last ports ids.
for
(
int
i
=
0
;
i
<
blobsIds
.
size
();
++
i
)
{
netBuilder
.
connect
((
size_t
)
blobsIds
[
i
],
{(
size_t
)
id
,
portIds
[
i
]});
netBuilder
.
connect
((
size_t
)
blobsIds
[
i
],
{(
size_t
)
id
,
(
size_t
)
portIds
[
i
]});
}
#endif
}
...
...
modules/dnn/test/test_halide_layers.cpp
浏览文件 @
4cbd09c4
...
...
@@ -232,8 +232,6 @@ TEST_P(LRN, Accuracy)
std
::
string
nrmType
=
get
<
4
>
(
GetParam
());
Backend
backendId
=
get
<
0
>
(
get
<
5
>
(
GetParam
()));
Target
targetId
=
get
<
1
>
(
get
<
5
>
(
GetParam
()));
if
(
backendId
==
DNN_BACKEND_INFERENCE_ENGINE
)
throw
SkipTestException
(
""
);
LayerParams
lp
;
lp
.
set
(
"norm_region"
,
nrmType
);
...
...
@@ -254,8 +252,8 @@ INSTANTIATE_TEST_CASE_P(Layer_Test_Halide, LRN, Combine(
/*input ch,w,h*/
Values
(
Vec3i
(
6
,
5
,
8
),
Vec3i
(
7
,
11
,
6
)),
/*local size*/
Values
(
3
,
5
),
Values
(
Vec3f
(
0.9
f
,
1.0
f
,
1.1
f
),
Vec3f
(
0.9
f
,
1.1
f
,
1.0
f
),
/*alpha, beta,
*/
Vec3f
(
1.0
f
,
0.9
f
,
1.1
f
),
Vec3f
(
1.0
f
,
1.1
f
,
0.9
f
),
/*bias */
Vec3f
(
1.1
f
,
0.9
f
,
1.0
f
),
Vec3f
(
1.1
f
,
1.0
f
,
0.9
f
)),
/*alpha, beta,
bias*/
Vec3f
(
1.0
f
,
0.9
f
,
1.1
f
),
Vec3f
(
1.0
f
,
1.1
f
,
0.9
f
),
Vec3f
(
1.1
f
,
0.9
f
,
1.0
f
),
Vec3f
(
1.1
f
,
1.0
f
,
0.9
f
)),
/*norm_by_size*/
Bool
(),
/*norm_type*/
Values
(
"ACROSS_CHANNELS"
,
"WITHIN_CHANNEL"
),
dnnBackendsAndTargetsWithHalide
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录