Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
88600d33
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
88600d33
编写于
3月 25, 2021
作者:
L
lyuwenyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add shuffle google mobile series
上级
5ac5b2c6
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
309 addition
and
1 deletion
+309
-1
hubconf.py
hubconf.py
+309
-1
未找到文件。
hubconf.py
浏览文件 @
88600d33
...
...
@@ -325,3 +325,311 @@ def InceptionV4(**kwargs):
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
GoogLeNet
(
**
kwargs
):
'''GoogLeNet
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_googlenet
.
GoogLeNet
(
**
kwargs
)
if
pretrained
:
assert
'GoogLeNet'
in
_checkpoints
,
'Not provide `GoogLeNet` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'GoogLeNet'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
ShuffleNet
(
**
kwargs
):
'''ShuffleNet
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_shufflenet_v2
.
ShuffleNet
(
**
kwargs
)
if
pretrained
:
assert
'ShuffleNet'
in
_checkpoints
,
'Not provide `ShuffleNet` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'ShuffleNet'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV1
(
**
kwargs
):
'''MobileNetV1
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v1
.
MobileNetV1
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV1'
in
_checkpoints
,
'Not provide `MobileNetV1` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV1'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV1_x0_25
(
**
kwargs
):
'''MobileNetV1_x0_25
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v1
.
MobileNetV1_x0_25
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV1_x0_25'
in
_checkpoints
,
'Not provide `MobileNetV1_x0_25` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV1_x0_25'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV1_x0_5
(
**
kwargs
):
'''MobileNetV1_x0_5
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v1
.
MobileNetV1_x0_5
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV1_x0_5'
in
_checkpoints
,
'Not provide `MobileNetV1_x0_5` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV1_x0_5'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV1_x0_75
(
**
kwargs
):
'''MobileNetV1_x0_75
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v1
.
MobileNetV1_x0_75
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV1_x0_75'
in
_checkpoints
,
'Not provide `MobileNetV1_x0_75` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV1_x0_75'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV2_x0_25
(
**
kwargs
):
'''MobileNetV2_x0_25
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v2
.
MobileNetV2_x0_25
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV2_x0_25'
in
_checkpoints
,
'Not provide `MobileNetV2_x0_25` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV2_x0_25'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV2_x0_5
(
**
kwargs
):
'''MobileNetV2_x0_5
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v2
.
MobileNetV2_x0_5
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV2_x0_5'
in
_checkpoints
,
'Not provide `MobileNetV2_x0_5` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV2_x0_5'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV2_x0_75
(
**
kwargs
):
'''MobileNetV2_x0_75
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v2
.
MobileNetV2_x0_75
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV2_x0_75'
in
_checkpoints
,
'Not provide `MobileNetV2_x0_75` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV2_x0_75'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV2_x1_5
(
**
kwargs
):
'''MobileNetV2_x1_5
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v2
.
MobileNetV2_x1_5
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV2_x1_5'
in
_checkpoints
,
'Not provide `MobileNetV2_x1_5` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV2_x1_5'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV2_x2_0
(
**
kwargs
):
'''MobileNetV2_x2_0
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v2
.
MobileNetV2_x2_0
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV2_x2_0'
in
_checkpoints
,
'Not provide `MobileNetV2_x2_0` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV2_x2_0'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_large_x0_35
(
**
kwargs
):
'''MobileNetV3_large_x0_35
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_large_x0_35
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_large_x0_35'
in
_checkpoints
,
'Not provide `MobileNetV3_large_x0_35` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_large_x0_35'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_large_x0_5
(
**
kwargs
):
'''MobileNetV3_large_x0_5
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_large_x0_5
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_large_x0_5'
in
_checkpoints
,
'Not provide `MobileNetV3_large_x0_5` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_large_x0_5'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_large_x0_75
(
**
kwargs
):
'''MobileNetV3_large_x0_75
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_large_x0_75
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_large_x0_75'
in
_checkpoints
,
'Not provide `MobileNetV3_large_x0_75` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_large_x0_75'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_large_x1_0
(
**
kwargs
):
'''MobileNetV3_large_x1_0
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_large_x1_0
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_large_x1_0'
in
_checkpoints
,
'Not provide `MobileNetV3_large_x1_0` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_large_x1_0'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_large_x1_25
(
**
kwargs
):
'''MobileNetV3_large_x1_25
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_large_x1_25
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_large_x1_25'
in
_checkpoints
,
'Not provide `MobileNetV3_large_x1_25` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_large_x1_25'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_small_x0_35
(
**
kwargs
):
'''MobileNetV3_small_x0_35
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_small_x0_35
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_small_x0_35'
in
_checkpoints
,
'Not provide `MobileNetV3_small_x0_35` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_small_x0_35'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_small_x0_5
(
**
kwargs
):
'''MobileNetV3_small_x0_5
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_small_x0_5
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_small_x0_5'
in
_checkpoints
,
'Not provide `MobileNetV3_small_x0_5` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_small_x0_5'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_small_x0_75
(
**
kwargs
):
'''MobileNetV3_small_x0_75
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_small_x0_75
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_small_x0_75'
in
_checkpoints
,
'Not provide `MobileNetV3_small_x0_75` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_small_x0_75'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_small_x1_0
(
**
kwargs
):
'''MobileNetV3_small_x1_0
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_small_x1_0
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_small_x1_0'
in
_checkpoints
,
'Not provide `MobileNetV3_small_x1_0` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_small_x1_0'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
def
MobileNetV3_small_x1_25
(
**
kwargs
):
'''MobileNetV3_small_x1_25
'''
pretrained
=
kwargs
.
pop
(
'pretrained'
,
False
)
model
=
_mobilenet_v3
.
MobileNetV3_small_x1_25
(
**
kwargs
)
if
pretrained
:
assert
'MobileNetV3_small_x1_25'
in
_checkpoints
,
'Not provide `MobileNetV3_small_x1_25` pretrained model.'
path
=
paddle
.
utils
.
download
.
get_weights_path_from_url
(
_checkpoints
[
'MobileNetV3_small_x1_25'
])
model
.
set_state_dict
(
paddle
.
load
(
path
))
return
model
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录