Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
39c24c1c
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看板
未验证
提交
39c24c1c
编写于
9月 17, 2020
作者:
L
littletomatodonkey
提交者:
GitHub
9月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #281 from littletomatodonkey/dyg/adp-2.0b
fix regularizer
上级
6589b2a8
4773a217
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
7 addition
and
5 deletion
+7
-5
ppcls/modeling/architectures/mobilenet_v3.py
ppcls/modeling/architectures/mobilenet_v3.py
+1
-1
ppcls/modeling/architectures/resnest.py
ppcls/modeling/architectures/resnest.py
+1
-1
ppcls/optimizer/optimizer.py
ppcls/optimizer/optimizer.py
+3
-2
ppcls/utils/check.py
ppcls/utils/check.py
+2
-1
未找到文件。
ppcls/modeling/architectures/mobilenet_v3.py
浏览文件 @
39c24c1c
...
@@ -23,7 +23,7 @@ import paddle.nn as nn
...
@@ -23,7 +23,7 @@ import paddle.nn as nn
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
from
paddle.nn
import
Conv2d
,
BatchNorm
,
Linear
,
Dropout
from
paddle.nn
import
Conv2d
,
BatchNorm
,
Linear
,
Dropout
from
paddle.nn
import
AdaptiveAvgPool2d
,
MaxPool2d
,
AvgPool2d
from
paddle.nn
import
AdaptiveAvgPool2d
,
MaxPool2d
,
AvgPool2d
from
paddle.regularizer
import
L2Decay
from
paddle.
fluid.
regularizer
import
L2Decay
import
math
import
math
...
...
ppcls/modeling/architectures/resnest.py
浏览文件 @
39c24c1c
...
@@ -24,7 +24,7 @@ from paddle import ParamAttr
...
@@ -24,7 +24,7 @@ from paddle import ParamAttr
from
paddle.nn.initializer
import
MSRA
from
paddle.nn.initializer
import
MSRA
from
paddle.nn
import
Conv2d
,
BatchNorm
,
Linear
,
Dropout
from
paddle.nn
import
Conv2d
,
BatchNorm
,
Linear
,
Dropout
from
paddle.nn
import
AdaptiveAvgPool2d
,
MaxPool2d
,
AvgPool2d
from
paddle.nn
import
AdaptiveAvgPool2d
,
MaxPool2d
,
AvgPool2d
from
paddle.regularizer
import
L2Decay
from
paddle.
fluid.
regularizer
import
L2Decay
__all__
=
[
"ResNeSt50_fast_1s1x64d"
,
"ResNeSt50"
]
__all__
=
[
"ResNeSt50_fast_1s1x64d"
,
"ResNeSt50"
]
...
...
ppcls/optimizer/optimizer.py
浏览文件 @
39c24c1c
...
@@ -19,6 +19,7 @@ from __future__ import print_function
...
@@ -19,6 +19,7 @@ from __future__ import print_function
import
sys
import
sys
import
paddle
import
paddle
import
paddle.fluid.regularizer
as
regularizer
__all__
=
[
'OptimizerBuilder'
]
__all__
=
[
'OptimizerBuilder'
]
...
@@ -36,7 +37,7 @@ class L1Decay(object):
...
@@ -36,7 +37,7 @@ class L1Decay(object):
self
.
factor
=
factor
self
.
factor
=
factor
def
__call__
(
self
):
def
__call__
(
self
):
reg
=
paddle
.
regularizer
.
L1Decay
(
self
.
factor
)
reg
=
regularizer
.
L1Decay
(
self
.
factor
)
return
reg
return
reg
...
@@ -53,7 +54,7 @@ class L2Decay(object):
...
@@ -53,7 +54,7 @@ class L2Decay(object):
self
.
factor
=
factor
self
.
factor
=
factor
def
__call__
(
self
):
def
__call__
(
self
):
reg
=
paddle
.
regularizer
.
L2Decay
(
self
.
factor
)
reg
=
regularizer
.
L2Decay
(
self
.
factor
)
return
reg
return
reg
...
...
ppcls/utils/check.py
浏览文件 @
39c24c1c
...
@@ -37,7 +37,8 @@ def check_version():
...
@@ -37,7 +37,8 @@ def check_version():
"or a suitable develop version is satisfied as well.
\n
"
\
"or a suitable develop version is satisfied as well.
\n
"
\
"Please make sure the version is good with your code."
"Please make sure the version is good with your code."
try
:
try
:
paddle
.
utils
.
require_version
(
'0.0.0'
)
pass
# paddle.utils.require_version('0.0.0')
except
Exception
:
except
Exception
:
logger
.
error
(
err
)
logger
.
error
(
err
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录