Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
9d985340
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
1 年多 前同步成功
通知
696
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9d985340
编写于
5月 23, 2018
作者:
T
tangwei12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update annotation grammar
上级
27b71751
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
python/paddle/fluid/io.py
python/paddle/fluid/io.py
+8
-8
未找到文件。
python/paddle/fluid/io.py
浏览文件 @
9d985340
...
...
@@ -464,10 +464,10 @@ def save_checkpoint(executor,
main_program
=
None
):
"""
Save Checkpoint will save persistable LodTensor variables from main_program in checkpoint directory,
directory named by serial number from 0 to (n -1), save_checkpoint use LRU strategy
the
directory named by serial number from 0 to (n -1), save_checkpoint use LRU strategy
to keep numbers of checkpoint directory, the numbers of checkpoint directory are max_num_checkpoints at most,
The interval time between two save_checkpoint must great than or equal to save_interval_secs.
:param dirname
:param max_num_checkpoints
:param save_secs
...
...
@@ -500,8 +500,8 @@ def save_checkpoint(executor,
def
load_checkpoint
(
executor
,
dirname
=
None
,
main_program
=
None
):
"""
Load checkpoint from directory by executor,
it will find la
s
test checkpoint file and load it auto.
Load checkpoint from
a
directory by executor,
it will find latest checkpoint file and load it auto.
:param executor
:param dirname
...
...
@@ -527,9 +527,9 @@ def load_checkpoint(executor, dirname=None, main_program=None):
def
_is_checkpoint_var
(
var
):
"""
checkpoint will not save or load all the variables.
var type is FEED_MINIBATCH/FETCH_LIST/RAW
and var name is end
with @GRAD are discarded.
the
checkpoint will not save or load all the variables.
var type is FEED_MINIBATCH/FETCH_LIST/RAW
or var name ends
with @GRAD are discarded.
:param var
"""
if
var
.
desc
.
type
()
==
core
.
VarDesc
.
VarType
.
FEED_MINIBATCH
or
\
...
...
@@ -571,7 +571,7 @@ def _lru_delete(dirname, max_num_checkpoints=3):
def
_write_success
(
dirname
):
"""
write an empty
_SUCCESS file to
checkpoint dir, indicate this checkpoint is correct.
write an empty
file named "_SUCCESS" in
checkpoint dir, indicate this checkpoint is correct.
:param dirname
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录