Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
b39d5ce1
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看板
未验证
提交
b39d5ce1
编写于
5月 26, 2020
作者:
L
littletomatodonkey
提交者:
GitHub
5月 26, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cbnet (#785)
Add `lr_multi_list` param for SSLD pretrained models' usage.
上级
1c23743b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
4 deletion
+20
-4
ppdet/modeling/backbones/cb_resnet.py
ppdet/modeling/backbones/cb_resnet.py
+20
-4
未找到文件。
ppdet/modeling/backbones/cb_resnet.py
浏览文件 @
b39d5ce1
...
...
@@ -65,7 +65,8 @@ class CBResNet(object):
feature_maps
=
[
2
,
3
,
4
,
5
],
dcn_v2_stages
=
[],
nonlocal_stages
=
[],
repeat_num
=
2
):
repeat_num
=
2
,
lr_mult_list
=
[
1.
,
1.
,
1.
,
1.
]):
super
(
CBResNet
,
self
).
__init__
()
if
isinstance
(
feature_maps
,
Integral
):
...
...
@@ -108,6 +109,9 @@ class CBResNet(object):
200
:
12
,
}
self
.
lr_mult_list
=
lr_mult_list
self
.
stage_num
=
-
1
self
.
stage_filters
=
[
64
,
128
,
256
,
512
]
self
.
_c1_out_chan_num
=
64
self
.
na
=
NameAdapter
(
self
)
...
...
@@ -143,6 +147,13 @@ class CBResNet(object):
act
=
None
,
name
=
None
,
dcn
=
False
):
# need fine lr for distilled model, default as 1.0
lr_mult
=
1.0
mult_idx
=
max
(
self
.
stage_num
-
2
,
0
)
mult_idx
=
min
(
self
.
stage_num
-
2
,
3
)
lr_mult
=
self
.
lr_mult_list
[
mult_idx
]
if
not
dcn
:
conv
=
fluid
.
layers
.
conv2d
(
input
=
input
,
...
...
@@ -153,7 +164,8 @@ class CBResNet(object):
groups
=
groups
,
act
=
None
,
param_attr
=
ParamAttr
(
name
=
name
+
"_weights_"
+
str
(
self
.
curr_level
)),
name
=
name
+
"_weights_"
+
str
(
self
.
curr_level
),
learning_rate
=
lr_mult
),
bias_attr
=
False
)
else
:
offset_mask
=
self
.
_conv_offset
(
...
...
@@ -182,12 +194,13 @@ class CBResNet(object):
deformable_groups
=
1
,
im2col_step
=
1
,
param_attr
=
ParamAttr
(
name
=
name
+
"_weights_"
+
str
(
self
.
curr_level
)),
name
=
name
+
"_weights_"
+
str
(
self
.
curr_level
),
learning_rate
=
lr_mult
),
bias_attr
=
False
)
bn_name
=
self
.
na
.
fix_conv_norm_name
(
name
)
norm_lr
=
0.
if
self
.
freeze_norm
else
1.
norm_lr
=
0.
if
self
.
freeze_norm
else
lr_mult
norm_decay
=
self
.
norm_decay
pattr
=
ParamAttr
(
name
=
bn_name
+
'_scale_'
+
str
(
self
.
curr_level
),
...
...
@@ -315,6 +328,8 @@ class CBResNet(object):
"""
assert
stage_num
in
[
2
,
3
,
4
,
5
]
self
.
stage_num
=
stage_num
stages
,
block_func
=
self
.
depth_cfg
[
self
.
depth
]
count
=
stages
[
stage_num
-
2
]
...
...
@@ -422,6 +437,7 @@ class CBResNet(object):
res_endpoints
.
append
(
res
)
for
num
in
range
(
1
,
self
.
repeat_num
):
self
.
stage_num
=
-
1
self
.
curr_level
=
num
res
=
self
.
c1_stage
(
input
)
for
i
in
range
(
len
(
res_endpoints
)):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录