提交 c6f042f5 编写于 作者: T tangwei12

modify load op

上级 9cf47afe
...@@ -62,7 +62,7 @@ class CheckpointLoadOp : public framework::OperatorBase { ...@@ -62,7 +62,7 @@ class CheckpointLoadOp : public framework::OperatorBase {
return; return;
} }
auto inp_var_names = Output("Out"); auto inp_var_names = Inputs("X");
PADDLE_ENFORCE_GT(static_cast<int>(inp_var_names.size()), 0, PADDLE_ENFORCE_GT(static_cast<int>(inp_var_names.size()), 0,
"The number of input variables should be greater than 0"); "The number of input variables should be greater than 0");
// get device context from pool // get device context from pool
...@@ -102,7 +102,10 @@ class CheckpointLoadOpProtoMaker : public framework::OpProtoAndCheckerMaker { ...@@ -102,7 +102,10 @@ class CheckpointLoadOpProtoMaker : public framework::OpProtoAndCheckerMaker {
public: public:
CheckpointLoadOpProtoMaker(OpProto *proto, OpAttrChecker *op_checker) CheckpointLoadOpProtoMaker(OpProto *proto, OpAttrChecker *op_checker)
: OpProtoAndCheckerMaker(proto, op_checker) { : OpProtoAndCheckerMaker(proto, op_checker) {
AddOutput("Out", "(Tensor) The tensor need to be loaded"); AddInput(
"X",
"(vector) Input LoDTensors that need to be saved together in a file.")
.AsDuplicable();
AddComment(R"DOC( AddComment(R"DOC(
CheckpointLoad operator CheckpointLoad operator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册