Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
41c2b7a0
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看板
未验证
提交
41c2b7a0
编写于
7月 09, 2020
作者:
G
Guanghua Yu
提交者:
GitHub
7月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add conv_decay and relu6 in mobilenet (#1039)
上级
55412467
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
7 addition
and
1 deletion
+7
-1
configs/ssd/ssdlite_mobilenet_v1.yml
configs/ssd/ssdlite_mobilenet_v1.yml
+1
-1
ppdet/modeling/backbones/mobilenet.py
ppdet/modeling/backbones/mobilenet.py
+6
-0
未找到文件。
configs/ssd/ssdlite_mobilenet_v1.yml
浏览文件 @
41c2b7a0
...
@@ -22,7 +22,7 @@ SSD:
...
@@ -22,7 +22,7 @@ SSD:
score_threshold
:
0.01
score_threshold
:
0.01
MobileNet
:
MobileNet
:
norm_decay
:
0.0
conv_decay
:
0.00004
conv_group_scale
:
1
conv_group_scale
:
1
extra_block_filters
:
[[
256
,
512
],
[
128
,
256
],
[
128
,
256
],
[
64
,
128
]]
extra_block_filters
:
[[
256
,
512
],
[
128
,
256
],
[
128
,
256
],
[
64
,
128
]]
with_extra_blocks
:
true
with_extra_blocks
:
true
...
...
ppdet/modeling/backbones/mobilenet.py
浏览文件 @
41c2b7a0
...
@@ -34,6 +34,7 @@ class MobileNet(object):
...
@@ -34,6 +34,7 @@ class MobileNet(object):
Args:
Args:
norm_type (str): normalization type, 'bn' and 'sync_bn' are supported
norm_type (str): normalization type, 'bn' and 'sync_bn' are supported
norm_decay (float): weight decay for normalization layer weights
norm_decay (float): weight decay for normalization layer weights
conv_decay (float): weight decay for convolution layer weights.
conv_group_scale (int): scaling factor for convolution groups
conv_group_scale (int): scaling factor for convolution groups
with_extra_blocks (bool): if extra blocks should be added
with_extra_blocks (bool): if extra blocks should be added
extra_block_filters (list): number of filter for each extra block
extra_block_filters (list): number of filter for each extra block
...
@@ -43,6 +44,7 @@ class MobileNet(object):
...
@@ -43,6 +44,7 @@ class MobileNet(object):
def
__init__
(
self
,
def
__init__
(
self
,
norm_type
=
'bn'
,
norm_type
=
'bn'
,
norm_decay
=
0.
,
norm_decay
=
0.
,
conv_decay
=
0.
,
conv_group_scale
=
1
,
conv_group_scale
=
1
,
conv_learning_rate
=
1.0
,
conv_learning_rate
=
1.0
,
with_extra_blocks
=
False
,
with_extra_blocks
=
False
,
...
@@ -51,6 +53,7 @@ class MobileNet(object):
...
@@ -51,6 +53,7 @@ class MobileNet(object):
weight_prefix_name
=
''
):
weight_prefix_name
=
''
):
self
.
norm_type
=
norm_type
self
.
norm_type
=
norm_type
self
.
norm_decay
=
norm_decay
self
.
norm_decay
=
norm_decay
self
.
conv_decay
=
conv_decay
self
.
conv_group_scale
=
conv_group_scale
self
.
conv_group_scale
=
conv_group_scale
self
.
conv_learning_rate
=
conv_learning_rate
self
.
conv_learning_rate
=
conv_learning_rate
self
.
with_extra_blocks
=
with_extra_blocks
self
.
with_extra_blocks
=
with_extra_blocks
...
@@ -70,6 +73,7 @@ class MobileNet(object):
...
@@ -70,6 +73,7 @@ class MobileNet(object):
parameter_attr
=
ParamAttr
(
parameter_attr
=
ParamAttr
(
learning_rate
=
self
.
conv_learning_rate
,
learning_rate
=
self
.
conv_learning_rate
,
initializer
=
fluid
.
initializer
.
MSRA
(),
initializer
=
fluid
.
initializer
.
MSRA
(),
regularizer
=
L2Decay
(
self
.
conv_decay
),
name
=
name
+
"_weights"
)
name
=
name
+
"_weights"
)
conv
=
fluid
.
layers
.
conv2d
(
conv
=
fluid
.
layers
.
conv2d
(
input
=
input
,
input
=
input
,
...
@@ -139,6 +143,7 @@ class MobileNet(object):
...
@@ -139,6 +143,7 @@ class MobileNet(object):
stride
=
1
,
stride
=
1
,
num_groups
=
int
(
num_groups
),
num_groups
=
int
(
num_groups
),
padding
=
0
,
padding
=
0
,
act
=
'relu6'
,
name
=
name
+
"_extra1"
)
name
=
name
+
"_extra1"
)
normal_conv
=
self
.
_conv_norm
(
normal_conv
=
self
.
_conv_norm
(
input
=
pointwise_conv
,
input
=
pointwise_conv
,
...
@@ -147,6 +152,7 @@ class MobileNet(object):
...
@@ -147,6 +152,7 @@ class MobileNet(object):
stride
=
2
,
stride
=
2
,
num_groups
=
int
(
num_groups
),
num_groups
=
int
(
num_groups
),
padding
=
1
,
padding
=
1
,
act
=
'relu6'
,
name
=
name
+
"_extra2"
)
name
=
name
+
"_extra2"
)
return
normal_conv
return
normal_conv
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录