Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
e039fc3a
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
e039fc3a
编写于
3月 28, 2018
作者:
D
Dmitry Kurtaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace protobuf's ReleaseLast to RemoveLast to deallocate memory.
Change an order of PriorBox layer operations.
上级
3a5f4312
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
modules/dnn/src/layers/prior_box_layer.cpp
modules/dnn/src/layers/prior_box_layer.cpp
+2
-2
modules/dnn/src/tensorflow/tf_graph_simplifier.cpp
modules/dnn/src/tensorflow/tf_graph_simplifier.cpp
+2
-2
modules/dnn/test/test_layers.cpp
modules/dnn/test/test_layers.cpp
+3
-3
未找到文件。
modules/dnn/src/layers/prior_box_layer.cpp
浏览文件 @
e039fc3a
...
...
@@ -419,8 +419,6 @@ public:
stepY
=
_stepY
;
}
int
_outChannelSize
=
_layerHeight
*
_layerWidth
*
_numPriors
*
4
;
float
*
outputPtr
=
outputs
[
0
].
ptr
<
float
>
();
float
_boxWidth
,
_boxHeight
;
for
(
size_t
h
=
0
;
h
<
_layerHeight
;
++
h
)
...
...
@@ -444,6 +442,8 @@ public:
// clip the prior's coordidate such that it is within [0, 1]
if
(
_clip
)
{
int
_outChannelSize
=
_layerHeight
*
_layerWidth
*
_numPriors
*
4
;
outputPtr
=
outputs
[
0
].
ptr
<
float
>
();
for
(
size_t
d
=
0
;
d
<
_outChannelSize
;
++
d
)
{
outputPtr
[
d
]
=
std
::
min
<
float
>
(
std
::
max
<
float
>
(
outputPtr
[
d
],
0.
),
1.
);
...
...
modules/dnn/src/tensorflow/tf_graph_simplifier.cpp
浏览文件 @
e039fc3a
...
...
@@ -219,7 +219,7 @@ public:
Mat
epsMat
=
getTensorContent
(
inputNodes
.
back
()
->
attr
().
at
(
"value"
).
tensor
());
CV_Assert
(
epsMat
.
total
()
==
1
,
epsMat
.
type
()
==
CV_32FC1
);
fusedNode
->
mutable_input
()
->
Re
leas
eLast
();
fusedNode
->
mutable_input
()
->
Re
mov
eLast
();
fusedNode
->
clear_attr
();
tensorflow
::
AttrValue
epsilon
;
epsilon
.
set_f
(
epsMat
.
at
<
float
>
(
0
));
...
...
@@ -254,7 +254,7 @@ public:
Mat
epsMat
=
getTensorContent
(
inputNodes
.
back
()
->
attr
().
at
(
"value"
).
tensor
());
CV_Assert
(
epsMat
.
total
()
==
1
,
epsMat
.
type
()
==
CV_32FC1
);
fusedNode
->
mutable_input
()
->
Re
leas
eLast
();
fusedNode
->
mutable_input
()
->
Re
mov
eLast
();
fusedNode
->
clear_attr
();
tensorflow
::
AttrValue
epsilon
;
epsilon
.
set_f
(
epsMat
.
at
<
float
>
(
0
));
...
...
modules/dnn/test/test_layers.cpp
浏览文件 @
e039fc3a
...
...
@@ -842,7 +842,7 @@ TEST(Layer_PriorBox, squares)
LayerParams
lp
;
lp
.
name
=
"testPriorBox"
;
lp
.
type
=
"PriorBox"
;
lp
.
set
(
"min_size"
,
3
2
);
lp
.
set
(
"min_size"
,
2
);
lp
.
set
(
"flip"
,
true
);
lp
.
set
(
"clip"
,
true
);
float
variance
[]
=
{
0.1
f
,
0.1
f
,
0.2
f
,
0.2
f
};
...
...
@@ -858,8 +858,8 @@ TEST(Layer_PriorBox, squares)
net
.
setInput
(
blobFromImage
(
inp
));
Mat
out
=
net
.
forward
();
Mat
target
=
(
Mat_
<
float
>
(
4
,
4
)
<<
-
7.75
f
,
-
15.5
f
,
8.25
f
,
16.5
f
,
-
7.25
f
,
-
15.5
f
,
8.75
f
,
16.5
f
,
Mat
target
=
(
Mat_
<
float
>
(
4
,
4
)
<<
0.0
,
0.0
,
0.75
,
1.0
,
0.25
,
0.0
,
1.0
,
1.0
,
0.1
f
,
0.1
f
,
0.2
f
,
0.2
f
,
0.1
f
,
0.1
f
,
0.2
f
,
0.2
f
);
normAssert
(
out
.
reshape
(
1
,
4
),
target
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录