Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
PaddleRec
提交
57882670
P
PaddleRec
项目概览
BaiXuePrincess
/
PaddleRec
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleRec
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
57882670
编写于
9月 11, 2019
作者:
L
linan17
浏览文件
操作
浏览文件
下载
差异文件
update for save way=3
Change-Id: Ie807ee70ba9912ba7cbbb30f39d6b56ab3040f60
上级
ae0b57ba
afc0c34c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
3 deletion
+8
-3
paddle/fluid/train/custom_trainer/feed/accessor/epoch_accessor.cc
...luid/train/custom_trainer/feed/accessor/epoch_accessor.cc
+2
-2
paddle/fluid/train/custom_trainer/feed/executor/multi_thread_executor.cc
...ain/custom_trainer/feed/executor/multi_thread_executor.cc
+1
-1
paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py
...luid/train/custom_trainer/feed/scripts/create_programs.py
+5
-0
未找到文件。
paddle/fluid/train/custom_trainer/feed/accessor/epoch_accessor.cc
浏览文件 @
57882670
...
...
@@ -32,7 +32,7 @@ namespace feed {
_inference_model_base_done_path
=
fs
->
path_join
(
_inference_model_path
,
config
[
"inference_base_done_name"
].
as
<
std
::
string
>
(
"xbox_base_done.txt"
));
_inference_model_delta_done_path
=
fs
->
path_join
(
_inference_model_path
,
config
[
"inference_delta_done_name"
].
as
<
std
::
string
>
(
"xbox_
delta
_done.txt"
));
config
[
"inference_delta_done_name"
].
as
<
std
::
string
>
(
"xbox_
patch
_done.txt"
));
return
0
;
}
...
...
@@ -149,7 +149,7 @@ namespace feed {
if
(
is_last_epoch
(
epoch_id
))
{
return
true
;
}
return
delta_id
(
epoch_id
)
%
24
==
0
;
return
delta_id
(
epoch_id
)
%
78
==
0
;
case
ModelSaveWay
::
ModelSaveTrainCheckpointBase
:
return
is_last_epoch
(
epoch_id
);
}
...
...
paddle/fluid/train/custom_trainer/feed/executor/multi_thread_executor.cc
浏览文件 @
57882670
...
...
@@ -79,7 +79,7 @@ int MultiThreadExecutor::initialize(YAML::Node exe_config,
CHECK
(
accessor_ptr
->
collect_persistables_name
(
_persistables
)
==
0
)
<<
"collect_persistables Failed, class:"
<<
accessor_class
;
}
//
std::sort(_persistables.begin(), _persistables.end()); // 持久化变量名一定要排序
std
::
sort
(
_persistables
.
begin
(),
_persistables
.
end
());
// 持久化变量名一定要排序
// Monitor组件
for
(
const
auto
&
monitor_config
:
_model_config
[
"monitor"
])
{
...
...
paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py
浏览文件 @
57882670
...
...
@@ -131,6 +131,11 @@ class ModelBuilder:
main_program
=
test_program
,
model_filename
=
'inference_program'
,
program_only
=
True
)
with
open
(
os
.
path
.
join
(
self
.
_save_path
,
'inference_program'
),
"rb"
)
as
f
:
program_desc_str
=
f
.
read
()
infer_program
=
fluid
.
Program
.
parse_from_string
(
program_desc_str
)
with
open
(
os
.
path
.
join
(
self
.
_save_path
,
'inference_program.pbtxt'
),
'w'
)
as
fout
:
fout
.
write
(
str
(
infer_program
))
params
=
filter
(
fluid
.
io
.
is_parameter
,
main_program
.
list_vars
())
vars
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录