Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
57a1d183
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
57a1d183
编写于
7月 25, 2018
作者:
T
tangwei12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hidden slice_vars in distribute transpile, hidden it to users
上级
3693394c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
7 deletion
+12
-7
python/paddle/fluid/io.py
python/paddle/fluid/io.py
+3
-3
python/paddle/fluid/trainer.py
python/paddle/fluid/trainer.py
+9
-4
未找到文件。
python/paddle/fluid/io.py
浏览文件 @
57a1d183
...
@@ -895,14 +895,14 @@ def get_test_program(filelist, program=None, startup_program=None):
...
@@ -895,14 +895,14 @@ def get_test_program(filelist, program=None, startup_program=None):
return
program
return
program
def
_load_slice_up_vars
(
executor
,
dirname
,
_
slice_vars_and_atts
):
def
_load_slice_up_vars
(
executor
,
dirname
,
slice_vars_and_atts
):
if
slice_vars
==
None
or
len
(
slice_var
s
)
==
0
:
if
slice_vars
_and_atts
==
None
or
len
(
slice_vars_and_att
s
)
==
0
:
return
return
load_prog
=
Program
()
load_prog
=
Program
()
load_block
=
load_prog
.
global_block
()
load_block
=
load_prog
.
global_block
()
for
var_tuple
in
slice_vars
:
for
var_tuple
in
slice_vars
_and_atts
:
orig_var
=
var_tuple
[
0
]
orig_var
=
var_tuple
[
0
]
start
=
var_tuple
[
1
]
start
=
var_tuple
[
1
]
slice_var
=
var_tuple
[
2
]
slice_var
=
var_tuple
[
2
]
...
...
python/paddle/fluid/trainer.py
浏览文件 @
57a1d183
...
@@ -235,6 +235,9 @@ class Trainer(object):
...
@@ -235,6 +235,9 @@ class Trainer(object):
# config for checkpoint
# config for checkpoint
# only chief worker will save variables
# only chief worker will save variables
self
.
trainer_id
=
0
self
.
trainer_id
=
0
self
.
pserver_id
=
None
self
.
pserver_endpoints
=
None
self
.
lookup_table_name
=
None
self
.
checkpoint_cfg
=
checkpoint_config
self
.
checkpoint_cfg
=
checkpoint_config
if
self
.
checkpoint_cfg
:
if
self
.
checkpoint_cfg
:
assert
isinstance
(
self
.
checkpoint_cfg
,
CheckpointConfig
)
assert
isinstance
(
self
.
checkpoint_cfg
,
CheckpointConfig
)
...
@@ -282,10 +285,12 @@ class Trainer(object):
...
@@ -282,10 +285,12 @@ class Trainer(object):
if
param_path
and
os
.
path
.
isdir
(
param_path
):
if
param_path
and
os
.
path
.
isdir
(
param_path
):
# load params from param_path into scope
# load params from param_path into scope
io
.
load_persistables
(
_load_persistable_vars
(
exe
,
param_path
,
self
.
startup_program
,
False
,
executor
=
exe
,
[
self
.
lookup_table_name
]
dirname
=
param_path
,
if
self
.
lookup_table_name
else
[])
main_program
=
self
.
startup_program
)
if
self
.
lookup_table_name
and
self
.
pserver_id
:
_load_lookup_table_vars
(
exe
,
param_path
,
self
.
startup_program
,
self
.
pserver_id
,
self
.
lookup_table_name
)
def
_transpile_nccl2_dist
(
self
):
def
_transpile_nccl2_dist
(
self
):
# PADDLE_TRAINER_IPS
# PADDLE_TRAINER_IPS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录