Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
15b561d7
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
15b561d7
编写于
5月 14, 2020
作者:
Y
Yang Zhang
提交者:
GitHub
5月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update API usage according to 1.8 recommendations (#666)
上级
321f506d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
17 deletion
+8
-17
ppdet/ext_op/test/test_corner_pool.py
ppdet/ext_op/test/test_corner_pool.py
+1
-1
ppdet/modeling/anchor_heads/fcos_head.py
ppdet/modeling/anchor_heads/fcos_head.py
+3
-11
ppdet/modeling/architectures/fcos.py
ppdet/modeling/architectures/fcos.py
+1
-1
ppdet/modeling/backbones/bfp.py
ppdet/modeling/backbones/bfp.py
+1
-1
ppdet/modeling/backbones/cb_resnet.py
ppdet/modeling/backbones/cb_resnet.py
+1
-2
ppdet/modeling/backbones/hrfpn.py
ppdet/modeling/backbones/hrfpn.py
+1
-1
未找到文件。
ppdet/ext_op/test/test_corner_pool.py
浏览文件 @
15b561d7
...
@@ -83,7 +83,7 @@ class TestRightPoolOp(unittest.TestCase):
...
@@ -83,7 +83,7 @@ class TestRightPoolOp(unittest.TestCase):
place
=
fluid
.
CUDAPlace
(
0
)
place
=
fluid
.
CUDAPlace
(
0
)
with
fluid
.
program_guard
(
tp
,
sp
):
with
fluid
.
program_guard
(
tp
,
sp
):
x
=
fluid
.
layers
.
data
(
x
=
fluid
.
data
(
name
=
self
.
name
,
name
=
self
.
name
,
shape
=
x_shape
,
shape
=
x_shape
,
dtype
=
x_type
,
dtype
=
x_type
,
...
...
ppdet/modeling/anchor_heads/fcos_head.py
浏览文件 @
15b561d7
...
@@ -283,22 +283,14 @@ class FCOSHead(object):
...
@@ -283,22 +283,14 @@ class FCOSHead(object):
last dimension is [x1, y1, x2, y2]
last dimension is [x1, y1, x2, y2]
"""
"""
act_shape_cls
=
self
.
__merge_hw
(
box_cls
)
act_shape_cls
=
self
.
__merge_hw
(
box_cls
)
box_cls_ch_last
=
fluid
.
layers
.
reshape
(
box_cls_ch_last
=
fluid
.
layers
.
reshape
(
x
=
box_cls
,
shape
=
act_shape_cls
)
x
=
box_cls
,
shape
=
[
self
.
batch_size
,
self
.
num_classes
,
-
1
],
actual_shape
=
act_shape_cls
)
box_cls_ch_last
=
fluid
.
layers
.
sigmoid
(
box_cls_ch_last
)
box_cls_ch_last
=
fluid
.
layers
.
sigmoid
(
box_cls_ch_last
)
act_shape_reg
=
self
.
__merge_hw
(
box_reg
,
"channel_last"
)
act_shape_reg
=
self
.
__merge_hw
(
box_reg
,
"channel_last"
)
box_reg_ch_last
=
fluid
.
layers
.
transpose
(
box_reg
,
perm
=
[
0
,
2
,
3
,
1
])
box_reg_ch_last
=
fluid
.
layers
.
transpose
(
box_reg
,
perm
=
[
0
,
2
,
3
,
1
])
box_reg_ch_last
=
fluid
.
layers
.
reshape
(
box_reg_ch_last
=
fluid
.
layers
.
reshape
(
x
=
box_reg_ch_last
,
x
=
box_reg_ch_last
,
shape
=
act_shape_reg
)
shape
=
[
self
.
batch_size
,
-
1
,
4
],
actual_shape
=
act_shape_reg
)
act_shape_ctn
=
self
.
__merge_hw
(
box_ctn
)
act_shape_ctn
=
self
.
__merge_hw
(
box_ctn
)
box_ctn_ch_last
=
fluid
.
layers
.
reshape
(
box_ctn_ch_last
=
fluid
.
layers
.
reshape
(
x
=
box_ctn
,
shape
=
act_shape_ctn
)
x
=
box_ctn
,
shape
=
[
self
.
batch_size
,
1
,
-
1
],
actual_shape
=
act_shape_ctn
)
box_ctn_ch_last
=
fluid
.
layers
.
sigmoid
(
box_ctn_ch_last
)
box_ctn_ch_last
=
fluid
.
layers
.
sigmoid
(
box_ctn_ch_last
)
box_reg_decoding
=
fluid
.
layers
.
stack
(
box_reg_decoding
=
fluid
.
layers
.
stack
(
...
...
ppdet/modeling/architectures/fcos.py
浏览文件 @
15b561d7
...
@@ -162,7 +162,7 @@ class FCOS(object):
...
@@ -162,7 +162,7 @@ class FCOS(object):
for
i
in
range
(
len
(
self
.
fcos_head
.
fpn_stride
)):
for
i
in
range
(
len
(
self
.
fcos_head
.
fpn_stride
)):
fields
.
extend
(
fields
.
extend
(
[
'labels%d'
%
i
,
'reg_target%d'
%
i
,
'centerness%d'
%
i
])
[
'labels%d'
%
i
,
'reg_target%d'
%
i
,
'centerness%d'
%
i
])
feed_vars
=
OrderedDict
([(
key
,
fluid
.
layers
.
data
(
feed_vars
=
OrderedDict
([(
key
,
fluid
.
data
(
name
=
key
,
name
=
key
,
shape
=
inputs_def
[
key
][
'shape'
],
shape
=
inputs_def
[
key
][
'shape'
],
dtype
=
inputs_def
[
key
][
'dtype'
],
dtype
=
inputs_def
[
key
][
'dtype'
],
...
...
ppdet/modeling/backbones/bfp.py
浏览文件 @
15b561d7
...
@@ -152,5 +152,5 @@ class BFP(object):
...
@@ -152,5 +152,5 @@ class BFP(object):
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
.
stop_gradient
=
True
out_shape
.
stop_gradient
=
True
body_output
=
fluid
.
layers
.
resize_nearest
(
body_output
=
fluid
.
layers
.
resize_nearest
(
body_input
,
scale
=
scale
,
actual
_shape
=
out_shape
)
body_input
,
scale
=
scale
,
out
_shape
=
out_shape
)
return
body_output
return
body_output
ppdet/modeling/backbones/cb_resnet.py
浏览文件 @
15b561d7
...
@@ -401,8 +401,7 @@ class CBResNet(object):
...
@@ -401,8 +401,7 @@ class CBResNet(object):
out_shape_
=
shape_hw
out_shape_
=
shape_hw
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
.
stop_gradient
=
True
out_shape
.
stop_gradient
=
True
conv
=
fluid
.
layers
.
resize_nearest
(
conv
=
fluid
.
layers
.
resize_nearest
(
conv
,
scale
=
2.
,
out_shape
=
out_shape
)
conv
,
scale
=
2.
,
actual_shape
=
out_shape
)
output
=
fluid
.
layers
.
elementwise_add
(
x
=
right
,
y
=
conv
)
output
=
fluid
.
layers
.
elementwise_add
(
x
=
right
,
y
=
conv
)
return
output
return
output
...
...
ppdet/modeling/backbones/hrfpn.py
浏览文件 @
15b561d7
...
@@ -120,7 +120,7 @@ class HRFPN(object):
...
@@ -120,7 +120,7 @@ class HRFPN(object):
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
=
fluid
.
layers
.
cast
(
out_shape_
,
dtype
=
'int32'
)
out_shape
.
stop_gradient
=
True
out_shape
.
stop_gradient
=
True
body_output
=
fluid
.
layers
.
resize_bilinear
(
body_output
=
fluid
.
layers
.
resize_bilinear
(
body_input
,
scale
=
scale
,
actual
_shape
=
out_shape
)
body_input
,
scale
=
scale
,
out
_shape
=
out_shape
)
return
body_output
return
body_output
def
pooling
(
self
,
input
,
size
,
stride
,
pooling_type
):
def
pooling
(
self
,
input
,
size
,
stride
,
pooling_type
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录