@@ -464,10 +464,10 @@ def save_checkpoint(executor,
464
464
main_program = None ):
465
465
"""
466
466
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
468
468
to keep numbers of checkpoint directory, the numbers of checkpoint directory are max_num_checkpoints at most,
469
469
The interval time between two save_checkpoint must great than or equal to save_interval_secs.
470
-
470
+
471
471
:param dirname
472
472
:param max_num_checkpoints
473
473
:param save_secs
@@ -500,8 +500,8 @@ def save_checkpoint(executor,
500
500
501
501
def load_checkpoint (executor , dirname = None , main_program = None ):
502
502
"""
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.
505
505
506
506
:param executor
507
507
:param dirname
@@ -527,9 +527,9 @@ def load_checkpoint(executor, dirname=None, main_program=None):
527
527
528
528
def _is_checkpoint_var (var ):
529
529
"""
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
+
533
533
:param var
534
534
"""
535
535
if var .desc .type () == core .VarDesc .VarType .FEED_MINIBATCH or \
@@ -571,7 +571,7 @@ def _lru_delete(dirname, max_num_checkpoints=3):
571
571
572
572
def _write_success (dirname ):
573
573
"""
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.
575
575
576
576
:param dirname
577
577
"""
0 commit comments