Skip to content

Commit 9d98534

Browse files
committed
update annotation grammar
1 parent 27b7175 commit 9d98534

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

python/paddle/fluid/io.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ def save_checkpoint(executor,
464464
main_program=None):
465465
"""
466466
Save Checkpoint will save persistable LodTensor variables from main_program in checkpoint directory,
467-
directory named by serial number from 0 to (n -1), save_checkpoint use LRU strategy
467+
the directory named by serial number from 0 to (n -1), save_checkpoint use LRU strategy
468468
to keep numbers of checkpoint directory, the numbers of checkpoint directory are max_num_checkpoints at most,
469469
The interval time between two save_checkpoint must great than or equal to save_interval_secs.
470-
470+
471471
:param dirname
472472
:param max_num_checkpoints
473473
:param save_secs
@@ -500,8 +500,8 @@ def save_checkpoint(executor,
500500

501501
def load_checkpoint(executor, dirname=None, main_program=None):
502502
"""
503-
Load checkpoint from directory by executor,
504-
it will find lastest checkpoint file and load it auto.
503+
Load checkpoint from a directory by executor,
504+
it will find latest checkpoint file and load it auto.
505505
506506
:param executor
507507
:param dirname
@@ -527,9 +527,9 @@ def load_checkpoint(executor, dirname=None, main_program=None):
527527

528528
def _is_checkpoint_var(var):
529529
"""
530-
checkpoint will not save or load all the variables.
531-
var type is FEED_MINIBATCH/FETCH_LIST/RAW and var name is end with @GRAD are discarded.
532-
530+
the checkpoint will not save or load all the variables.
531+
var type is FEED_MINIBATCH/FETCH_LIST/RAW or var name ends with @GRAD are discarded.
532+
533533
:param var
534534
"""
535535
if var.desc.type() == core.VarDesc.VarType.FEED_MINIBATCH or \
@@ -571,7 +571,7 @@ def _lru_delete(dirname, max_num_checkpoints=3):
571571

572572
def _write_success(dirname):
573573
"""
574-
write an empty _SUCCESS file to checkpoint dir, indicate this checkpoint is correct.
574+
write an empty file named "_SUCCESS" in checkpoint dir, indicate this checkpoint is correct.
575575
576576
:param dirname
577577
"""

0 commit comments

Comments
 (0)