Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSlim
提交
18c86052
P
PaddleSlim
项目概览
PaddlePaddle
/
PaddleSlim
接近 2 年 前同步成功
通知
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看板
提交
18c86052
编写于
11月 19, 2019
作者:
C
ceci3
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update mobilenetv1
上级
fed41425
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
3 deletion
+15
-3
paddleslim/nas/search_space/mobilenetv1.py
paddleslim/nas/search_space/mobilenetv1.py
+15
-3
未找到文件。
paddleslim/nas/search_space/mobilenetv1.py
浏览文件 @
18c86052
...
...
@@ -38,7 +38,9 @@ class MobileNetV1Space(SearchSpaceBase):
block_num
)
self
.
scale
=
scale
self
.
class_dim
=
class_dim
# self.head_num means the channel of first convolution
self
.
head_num
=
np
.
array
([
3
,
4
,
8
,
12
,
16
,
24
,
32
])
# 7
# self.filter_num1 ~ self.filtet_num9 means channel of the following convolution
self
.
filter_num1
=
np
.
array
([
3
,
4
,
8
,
12
,
16
,
24
,
32
,
48
])
# 8
self
.
filter_num2
=
np
.
array
([
8
,
12
,
16
,
24
,
32
,
48
,
64
,
80
])
# 8
self
.
filter_num3
=
np
.
array
(
...
...
@@ -58,7 +60,9 @@ class MobileNetV1Space(SearchSpaceBase):
self
.
filter_num9
=
np
.
array
(
[
160
,
192
,
224
,
256
,
320
,
384
,
512
,
640
,
768
,
832
,
1024
,
1048
])
#12
# self.k_size means kernel size
self
.
k_size
=
np
.
array
([
3
,
5
])
#2
# self.repeat means repeat_num in forth downsample
self
.
repeat
=
np
.
array
([
1
,
2
,
3
,
4
,
5
,
6
])
#6
assert
self
.
block_num
<
6
,
'MobileNetV1: block number must less than 6, but receive block number is {}'
.
format
(
...
...
@@ -69,7 +73,7 @@ class MobileNetV1Space(SearchSpaceBase):
The initial token.
The first one is the index of the first layers' channel in self.head_num,
each line in the following represent the index of the [filter_num1, filter_num2, kernel_size]
and depth means repeat times for forth
up
sample
and depth means repeat times for forth
down
sample
"""
# yapf: disable
base_init_tokens
=
[
6
,
# 32
...
...
@@ -95,8 +99,16 @@ class MobileNetV1Space(SearchSpaceBase):
Get range table of current search space, constrains the range of tokens.
"""
base_range_table
=
[
7
,
8
,
8
,
2
,
8
,
10
,
2
,
10
,
10
,
2
,
10
,
12
,
2
,
12
,
11
,
2
,
11
,
14
,
2
,
6
,
14
,
13
,
2
,
13
,
12
,
2
,
12
,
12
,
2
len
(
self
.
head_num
),
len
(
self
.
filter_num1
),
len
(
self
.
filter_num2
),
len
(
self
.
k_size
),
len
(
self
.
filter_num2
),
len
(
self
.
filter_num3
),
len
(
self
.
k_size
),
len
(
self
.
filter_num3
),
len
(
self
.
filter_num4
),
len
(
self
.
k_size
),
len
(
self
.
filter_num4
),
len
(
self
.
filter_num5
),
len
(
self
.
k_size
),
len
(
self
.
filter_num5
),
len
(
self
.
filter_num6
),
len
(
self
.
k_size
),
len
(
self
.
filter_num6
),
len
(
self
.
filter_num7
),
len
(
self
.
k_size
),
len
(
self
.
repeat
),
len
(
self
.
filter_num7
),
len
(
self
.
filter_num8
),
len
(
self
.
k_size
),
len
(
self
.
filter_num8
),
len
(
self
.
filter_num9
),
len
(
self
.
k_size
),
len
(
self
.
filter_num9
),
len
(
self
.
filter_num9
),
len
(
self
.
k_size
)
]
return
base_range_table
[:
self
.
token_len
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录