From 0334d494406ff3fc0ac6e9a078ce17bee38a2fd6 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Tue, 15 May 2018 18:58:00 +0800 Subject: [PATCH] fix bug --- paddle/fluid/operators/checkpoint_load_op.cc | 7 +++++++ paddle/fluid/operators/checkpoint_save_op.cc | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/operators/checkpoint_load_op.cc b/paddle/fluid/operators/checkpoint_load_op.cc index 8edf3b6429d..ec451c9f3f0 100644 --- a/paddle/fluid/operators/checkpoint_load_op.cc +++ b/paddle/fluid/operators/checkpoint_load_op.cc @@ -61,6 +61,13 @@ class CheckpointLoadOpProtoMaker : public framework::OpProtoAndCheckerMaker { public: CheckpointLoadOpProtoMaker(OpProto *proto, OpAttrChecker *op_checker) : OpProtoAndCheckerMaker(proto, op_checker) { + AddComment(R"DOC( +CheckpointLoad operator + +This operator will serialize and write a list of input LoDTensor variables +to a file on disk. +)DOC"); + AddAttr( "dir", "(string)" diff --git a/paddle/fluid/operators/checkpoint_save_op.cc b/paddle/fluid/operators/checkpoint_save_op.cc index 7449352117b..1082bb4a345 100644 --- a/paddle/fluid/operators/checkpoint_save_op.cc +++ b/paddle/fluid/operators/checkpoint_save_op.cc @@ -180,7 +180,7 @@ class CheckpointSaveOpShapeInference : public framework::InferShapeBase { namespace ops = paddle::operators; -REGISTER_OPERATOR(send_vars, ops::CheckpointSaveOp, +REGISTER_OPERATOR(checkpoint_save, ops::CheckpointSaveOp, paddle::framework::EmptyGradOpMaker, ops::CheckpointSaveOpProtoMaker, ops::CheckpointSaveOpVarTypeInference, -- GitLab