提交 c06f43bb 编写于 作者: T tangwei12

add annotation about _is_checkpoint_var

上级 77340348
...@@ -639,13 +639,14 @@ def _is_checkpoint_var(var): ...@@ -639,13 +639,14 @@ def _is_checkpoint_var(var):
var.desc.type() == core.VarDesc.VarType.FETCH_LIST or \ var.desc.type() == core.VarDesc.VarType.FETCH_LIST or \
var.desc.type() == core.VarDesc.VarType.RAW: var.desc.type() == core.VarDesc.VarType.RAW:
return False return False
# @GRAD are named for gradient varibales, checkpoint will not save it.
if "@GRAD" in var.name: if "@GRAD" in var.name:
return False return False
# .trainer_ are named for distribute trian variables, checkpoint will not save it.
if ".trainer_" in var.name: if ".trainer_" in var.name:
return False return False
# .block is named for distribute trian variables, checkpoint will not save it.
if ".block" in var.name: if ".block" in var.name:
return False return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册