Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
07330e0e
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看板
未验证
提交
07330e0e
编写于
11月 30, 2020
作者:
L
littletomatodonkey
提交者:
GitHub
11月 30, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix resnest typo (#380)
fix resnest, ghostnet typo
上级
96c078da
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
16 deletion
+12
-16
configs/ShuffleNet/ShuffleNetV2_x1_0.yaml
configs/ShuffleNet/ShuffleNetV2_x1_0.yaml
+1
-1
ppcls/modeling/architectures/__init__.py
ppcls/modeling/architectures/__init__.py
+1
-2
ppcls/modeling/architectures/ghostnet.py
ppcls/modeling/architectures/ghostnet.py
+1
-4
ppcls/modeling/architectures/resnest.py
ppcls/modeling/architectures/resnest.py
+7
-7
ppcls/modeling/architectures/shufflenet_v2.py
ppcls/modeling/architectures/shufflenet_v2.py
+2
-2
未找到文件。
configs/ShuffleNet/ShuffleNetV2.yaml
→
configs/ShuffleNet/ShuffleNetV2
_x1_0
.yaml
浏览文件 @
07330e0e
mode
:
'
train'
ARCHITECTURE
:
name
:
"
ShuffleNetV2"
name
:
"
ShuffleNetV2
_x1_0
"
pretrained_model
:
"
"
model_save_dir
:
"
./output/"
...
...
ppcls/modeling/architectures/__init__.py
浏览文件 @
07330e0e
...
...
@@ -32,14 +32,13 @@ from .ghostnet import GhostNet_x0_5, GhostNet_x1_0, GhostNet_x1_3
from
.mobilenet_v1
import
MobileNetV1_x0_25
,
MobileNetV1_x0_5
,
MobileNetV1_x0_75
,
MobileNetV1
from
.mobilenet_v2
import
MobileNetV2_x0_25
,
MobileNetV2_x0_5
,
MobileNetV2_x0_75
,
MobileNetV2
,
MobileNetV2_x1_5
,
MobileNetV2_x2_0
from
.mobilenet_v3
import
MobileNetV3_small_x0_35
,
MobileNetV3_small_x0_5
,
MobileNetV3_small_x0_75
,
MobileNetV3_small_x1_0
,
MobileNetV3_small_x1_25
,
MobileNetV3_large_x0_35
,
MobileNetV3_large_x0_5
,
MobileNetV3_large_x0_75
,
MobileNetV3_large_x1_0
,
MobileNetV3_large_x1_25
from
.shufflenet_v2
import
ShuffleNetV2_x0_25
,
ShuffleNetV2_x0_33
,
ShuffleNetV2_x0_5
,
ShuffleNetV2
,
ShuffleNetV2_x1_5
,
ShuffleNetV2_x2_0
,
ShuffleNetV2_swish
from
.shufflenet_v2
import
ShuffleNetV2_x0_25
,
ShuffleNetV2_x0_33
,
ShuffleNetV2_x0_5
,
ShuffleNetV2
_x1_0
,
ShuffleNetV2_x1_5
,
ShuffleNetV2_x2_0
,
ShuffleNetV2_swish
from
.alexnet
import
AlexNet
from
.inception_v3
import
InceptionV3
from
.inception_v4
import
InceptionV4
from
.xception
import
Xception41
,
Xception65
,
Xception71
from
.xception_deeplab
import
Xception41_deeplab
,
Xception65_deeplab
,
Xception71_deeplab
from
.resnext101_wsl
import
ResNeXt101_32x8d_wsl
,
ResNeXt101_32x16d_wsl
,
ResNeXt101_32x32d_wsl
,
ResNeXt101_32x48d_wsl
from
.shufflenet_v2
import
ShuffleNetV2_x0_25
,
ShuffleNetV2_x0_33
,
ShuffleNetV2_x0_5
,
ShuffleNetV2
,
ShuffleNetV2_x1_5
,
ShuffleNetV2_x2_0
,
ShuffleNetV2_swish
from
.squeezenet
import
SqueezeNet1_0
,
SqueezeNet1_1
from
.vgg
import
VGG11
,
VGG13
,
VGG16
,
VGG19
from
.darknet
import
DarkNet53
...
...
ppcls/modeling/architectures/ghostnet.py
浏览文件 @
07330e0e
...
...
@@ -44,7 +44,6 @@ class ConvBNLayer(nn.Layer):
bias_attr
=
False
)
bn_name
=
name
+
"_bn"
# In the old version, moving_variance_name was name + "_variance"
self
.
_batch_norm
=
BatchNorm
(
num_channels
=
out_channels
,
act
=
act
,
...
...
@@ -53,9 +52,7 @@ class ConvBNLayer(nn.Layer):
bias_attr
=
ParamAttr
(
name
=
bn_name
+
"_offset"
,
regularizer
=
L2Decay
(
0.0
)),
moving_mean_name
=
bn_name
+
"_mean"
,
moving_variance_name
=
name
+
"_variance"
# wrong due to an old typo, will be fixed later.
)
moving_variance_name
=
bn_name
+
"_variance"
)
def
forward
(
self
,
inputs
):
y
=
self
.
_conv
(
inputs
)
...
...
ppcls/modeling/architectures/resnest.py
浏览文件 @
07330e0e
...
...
@@ -120,7 +120,7 @@ class SplatConv(nn.Layer):
stride
=
stride
,
groups
=
groups
*
radix
,
act
=
"relu"
,
name
=
name
+
"_
splat1
"
)
name
=
name
+
"_
1_weights
"
)
self
.
avg_pool2d
=
AdaptiveAvgPool2D
(
1
)
...
...
@@ -134,7 +134,7 @@ class SplatConv(nn.Layer):
stride
=
1
,
groups
=
groups
,
act
=
"relu"
,
name
=
name
+
"_
splat2
"
)
name
=
name
+
"_
2_weights
"
)
# to calc atten
self
.
conv3
=
Conv2D
(
...
...
@@ -145,7 +145,7 @@ class SplatConv(nn.Layer):
padding
=
0
,
groups
=
groups
,
weight_attr
=
ParamAttr
(
name
=
name
+
"_
splat_
weights"
,
initializer
=
KaimingNormal
()),
name
=
name
+
"_weights"
,
initializer
=
KaimingNormal
()),
bias_attr
=
False
)
self
.
rsoftmax
=
rSoftmax
(
radix
=
radix
,
cardinality
=
groups
)
...
...
@@ -233,7 +233,7 @@ class BottleneckBlock(nn.Layer):
bias
=
False
,
radix
=
radix
,
rectify_avg
=
rectify_avg
,
name
=
name
+
"_splat
conv
"
)
name
=
name
+
"_splat"
)
else
:
self
.
conv2
=
ConvBNLayer
(
num_channels
=
group_width
,
...
...
@@ -403,10 +403,10 @@ class ResNeStLayer(nn.Layer):
self
.
inplanes
=
planes
*
4
self
.
bottleneck_block_list
=
[
bottleneck_func
]
for
i
in
range
(
1
,
blocks
):
name
=
name
+
"_bottleneck_"
+
str
(
i
)
curr_
name
=
name
+
"_bottleneck_"
+
str
(
i
)
bottleneck_func
=
self
.
add_sublayer
(
name
,
curr_
name
,
BottleneckBlock
(
inplanes
=
self
.
inplanes
,
planes
=
planes
,
...
...
@@ -419,7 +419,7 @@ class ResNeStLayer(nn.Layer):
dilation
=
dilation
,
rectify_avg
=
rectify_avg
,
last_gamma
=
last_gamma
,
name
=
name
))
name
=
curr_
name
))
self
.
bottleneck_block_list
.
append
(
bottleneck_func
)
def
forward
(
self
,
x
):
...
...
ppcls/modeling/architectures/shufflenet_v2.py
浏览文件 @
07330e0e
...
...
@@ -23,7 +23,7 @@ from paddle.nn.functional import swish
__all__
=
[
"ShuffleNetV2_x0_25"
,
"ShuffleNetV2_x0_33"
,
"ShuffleNetV2_x0_5"
,
"ShuffleNetV2"
,
"ShuffleNetV2_x1_5"
,
"ShuffleNetV2_x2_0"
,
"ShuffleNetV2
_x1_0
"
,
"ShuffleNetV2_x1_5"
,
"ShuffleNetV2_x2_0"
,
"ShuffleNetV2_swish"
]
...
...
@@ -299,7 +299,7 @@ def ShuffleNetV2_x0_5(**args):
return
model
def
ShuffleNetV2
(
**
args
):
def
ShuffleNetV2
_x1_0
(
**
args
):
model
=
ShuffleNet
(
scale
=
1.0
,
**
args
)
return
model
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录