Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSlim
提交
f30a4a1b
P
PaddleSlim
项目概览
PaddlePaddle
/
PaddleSlim
大约 1 年 前同步成功
通知
51
Star
1434
Fork
344
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
16
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSlim
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
16
合并请求
16
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f30a4a1b
编写于
12月 13, 2019
作者:
L
lvmengsi
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix_mobilenetv2' into 'develop'
Fix mobilenetv2 See merge request
!84
上级
47461da0
b29a4217
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
14 deletion
+9
-14
paddleslim/nas/search_space/mobilenetv2.py
paddleslim/nas/search_space/mobilenetv2.py
+9
-14
未找到文件。
paddleslim/nas/search_space/mobilenetv2.py
浏览文件 @
f30a4a1b
...
...
@@ -60,7 +60,6 @@ class MobileNetV2Space(SearchSpaceBase):
# original MobileNetV2
# yapf: disable
init_token_base
=
[
4
,
# 1, 16, 1
4
,
5
,
1
,
0
,
# 6, 24, 1
4
,
5
,
1
,
0
,
# 6, 24, 2
4
,
4
,
2
,
0
,
# 6, 32, 3
4
,
4
,
3
,
0
,
# 6, 64, 4
...
...
@@ -75,10 +74,9 @@ class MobileNetV2Space(SearchSpaceBase):
"""
Get range table of current search space, constrains the range of tokens.
"""
# head_num +
7
* [multiple(expansion_factor), filter_num, repeat, kernel_size]
# head_num +
6
* [multiple(expansion_factor), filter_num, repeat, kernel_size]
# yapf: disable
range_table_base
=
[
len
(
self
.
head_num
),
len
(
self
.
multiply
),
len
(
self
.
filter_num1
),
len
(
self
.
repeat
),
len
(
self
.
k_size
),
len
(
self
.
multiply
),
len
(
self
.
filter_num1
),
len
(
self
.
repeat
),
len
(
self
.
k_size
),
len
(
self
.
multiply
),
len
(
self
.
filter_num2
),
len
(
self
.
repeat
),
len
(
self
.
k_size
),
len
(
self
.
multiply
),
len
(
self
.
filter_num3
),
len
(
self
.
repeat
),
len
(
self
.
k_size
),
...
...
@@ -103,23 +101,20 @@ class MobileNetV2Space(SearchSpaceBase):
(
self
.
multiply
[
tokens
[
1
]],
self
.
filter_num1
[
tokens
[
2
]],
self
.
repeat
[
tokens
[
3
]],
2
,
self
.
k_size
[
tokens
[
4
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
5
]],
self
.
filter_num
1
[
tokens
[
6
]],
(
self
.
multiply
[
tokens
[
5
]],
self
.
filter_num
2
[
tokens
[
6
]],
self
.
repeat
[
tokens
[
7
]],
2
,
self
.
k_size
[
tokens
[
8
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
9
]],
self
.
filter_num
2
[
tokens
[
10
]],
(
self
.
multiply
[
tokens
[
9
]],
self
.
filter_num
3
[
tokens
[
10
]],
self
.
repeat
[
tokens
[
11
]],
2
,
self
.
k_size
[
tokens
[
12
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
13
]],
self
.
filter_num3
[
tokens
[
14
]],
self
.
repeat
[
tokens
[
15
]],
2
,
self
.
k_size
[
tokens
[
16
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
17
]],
self
.
filter_num4
[
tokens
[
18
]],
self
.
repeat
[
tokens
[
19
]],
1
,
self
.
k_size
[
tokens
[
20
]]))
(
self
.
multiply
[
tokens
[
13
]],
self
.
filter_num4
[
tokens
[
14
]],
self
.
repeat
[
tokens
[
15
]],
1
,
self
.
k_size
[
tokens
[
16
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
21
]],
self
.
filter_num5
[
tokens
[
22
]],
self
.
repeat
[
tokens
[
23
]],
2
,
self
.
k_size
[
tokens
[
24
]]))
(
self
.
multiply
[
tokens
[
17
]],
self
.
filter_num5
[
tokens
[
18
]],
self
.
repeat
[
tokens
[
19
]],
2
,
self
.
k_size
[
tokens
[
20
]]))
self
.
bottleneck_params_list
.
append
(
(
self
.
multiply
[
tokens
[
2
5
]],
self
.
filter_num6
[
tokens
[
26
]],
self
.
repeat
[
tokens
[
2
7
]],
1
,
self
.
k_size
[
tokens
[
28
]]))
(
self
.
multiply
[
tokens
[
2
1
]],
self
.
filter_num6
[
tokens
[
22
]],
self
.
repeat
[
tokens
[
2
3
]],
1
,
self
.
k_size
[
tokens
[
24
]]))
def
_modify_bottle_params
(
output_stride
=
None
):
if
output_stride
is
not
None
and
output_stride
%
2
!=
0
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录