Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
f5265a1f
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看板
未验证
提交
f5265a1f
编写于
6月 06, 2022
作者:
W
Wei Shengyu
提交者:
GitHub
6月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1965 from TingquanGao/2.4/rm_fluid
[cherry-pick] remove fluid
上级
51c1bdb2
41e9a8d2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
ppcls/engine/engine.py
ppcls/engine/engine.py
+1
-1
ppcls/static/save_load.py
ppcls/static/save_load.py
+2
-2
ppcls/static/train.py
ppcls/static/train.py
+1
-1
ppcls/utils/download.py
ppcls/utils/download.py
+1
-1
未找到文件。
ppcls/engine/engine.py
浏览文件 @
f5265a1f
...
...
@@ -221,7 +221,7 @@ class Engine(object):
AMP_RELATED_FLAGS_SETTING
.
update
({
'FLAGS_cudnn_batchnorm_spatial_persistent'
:
1
})
paddle
.
fluid
.
set_flags
(
AMP_RELATED_FLAGS_SETTING
)
paddle
.
set_flags
(
AMP_RELATED_FLAGS_SETTING
)
self
.
scale_loss
=
self
.
config
[
"AMP"
].
get
(
"scale_loss"
,
1.0
)
self
.
use_dynamic_loss_scaling
=
self
.
config
[
"AMP"
].
get
(
...
...
ppcls/static/save_load.py
浏览文件 @
f5265a1f
...
...
@@ -62,8 +62,8 @@ def load_params(exe, prog, path, ignore_params=None):
"""
Load model from the given path.
Args:
exe (
fluid.Executor): The fluid
.Executor object.
prog (
fluid
.Program): load weight to which Program object.
exe (
paddle.static.Executor): The paddle.static
.Executor object.
prog (
paddle.static
.Program): load weight to which Program object.
path (string): URL string or loca model path.
ignore_params (list): ignore variable to load when finetuning.
It can be specified by finetune_exclude_pretrained_params
...
...
ppcls/static/train.py
浏览文件 @
f5265a1f
...
...
@@ -87,7 +87,7 @@ def main(args):
'FLAGS_max_inplace_grad_add'
:
8
,
}
os
.
environ
[
'FLAGS_cudnn_batchnorm_spatial_persistent'
]
=
'1'
paddle
.
fluid
.
set_flags
(
AMP_RELATED_FLAGS_SETTING
)
paddle
.
set_flags
(
AMP_RELATED_FLAGS_SETTING
)
use_xpu
=
global_config
.
get
(
"use_xpu"
,
False
)
use_npu
=
global_config
.
get
(
"use_npu"
,
False
)
...
...
ppcls/utils/download.py
浏览文件 @
f5265a1f
...
...
@@ -112,7 +112,7 @@ def get_path_from_url(url,
str: a local path to save downloaded models & weights & datasets.
"""
from
paddle.
fluid.dygraph.parallel
import
ParallelEnv
from
paddle.
distributed
import
ParallelEnv
assert
is_url
(
url
),
"downloading from {} not a url"
.
format
(
url
)
# parse path after download to decompress under root_dir
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录