From c06f43bbb6aec4ae12d514ca92a77aed0d473882 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Mon, 4 Jun 2018 15:20:06 +0800 Subject: [PATCH] add annotation about _is_checkpoint_var --- python/paddle/fluid/io.py | 5 +++-- tools/codestyle/docstring_checker.pyc | Bin 12561 -> 12561 bytes 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 62e3046db64..75146fe3269 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -639,13 +639,14 @@ def _is_checkpoint_var(var): var.desc.type() == core.VarDesc.VarType.FETCH_LIST or \ var.desc.type() == core.VarDesc.VarType.RAW: return False - + # @GRAD are named for gradient varibales, checkpoint will not save it. if "@GRAD" in var.name: return False - + # .trainer_ are named for distribute trian variables, checkpoint will not save it. if ".trainer_" in var.name: return False + # .block is named for distribute trian variables, checkpoint will not save it. if ".block" in var.name: return False diff --git a/tools/codestyle/docstring_checker.pyc b/tools/codestyle/docstring_checker.pyc index 1f0255b763c8d154b7cc17d2d525148dfea3b42d..a27d3c9a8cccab8552d510578debb2df04eb53bb 100644 GIT binary patch delta 16 XcmbQ3G%<;t`7|BNbF9rm> delta 16 XcmbQ3G%<;t`7|BNbF*pSi -- GitLab