From 985026ce42f538f61dad9286c9dfb86929f5115a Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Fri, 15 Jun 2018 18:37:14 +0800 Subject: [PATCH] add checkpoint_notify in python --- paddle/fluid/operators/checkpoint_notify_op.cc | 2 +- python/paddle/fluid/framework.py | 2 +- python/paddle/fluid/io.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/checkpoint_notify_op.cc b/paddle/fluid/operators/checkpoint_notify_op.cc index c229cbf4984..026ad722c27 100644 --- a/paddle/fluid/operators/checkpoint_notify_op.cc +++ b/paddle/fluid/operators/checkpoint_notify_op.cc @@ -76,7 +76,7 @@ class CheckpointNotifyOpShapeInference : public framework::InferShapeBase { namespace ops = paddle::operators; -REGISTER_OPERATOR(checkpointnotify, ops::CheckpointNotifyOp, +REGISTER_OPERATOR(checkpoint_notify, ops::CheckpointNotifyOp, paddle::framework::EmptyGradOpMaker, ops::CheckpointNotifyOpMaker, ops::CheckpointNotifyOpShapeInference); diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index bbd35aaecba..edc7ba69dd6 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -382,7 +382,7 @@ class Operator(object): 'rnn_memory_helper_grad', 'conditional_block', 'while', 'send', 'recv', 'listen_and_serv', 'parallel_do', 'save_combine', 'load_combine', 'ncclInit', 'channel_create', 'channel_close', 'channel_send', - 'channel_recv', 'select' + 'channel_recv', 'select', 'checkpoint_notify' } def __init__(self, diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 6a0e422cb37..253fd5651c6 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -613,7 +613,7 @@ def save_pserver_vars_by_notify(executor, dirname, epmap): attrs['dir'] = cur_dir checkpoint_notify_block.append_op( - type='checkpointnotify', inputs={}, output={}, attrs=attrs) + type='checkpoint_notify', inputs={}, output={}, attrs=attrs) executor.run(checkpoint_notify_program) -- GitLab