From 98c30c7cbea4f4ed00ed22fdc8fff06268e74629 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Fri, 15 Jun 2018 15:39:03 +0800 Subject: [PATCH] bug fix --- paddle/fluid/operators/save_op.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/save_op.cc b/paddle/fluid/operators/save_op.cc index 3277d09ab20..b54bd7db367 100644 --- a/paddle/fluid/operators/save_op.cc +++ b/paddle/fluid/operators/save_op.cc @@ -96,8 +96,8 @@ class SaveOp : public framework::OperatorBase { } } - SaveLodTensor(const std::string &filename, const platform::Place &place, - framework::Variable *var) { + void SaveLodTensor(const std::string &filename, const platform::Place &place, + framework::Variable *var) const { auto &tensor = var->Get(); // get device context from pool @@ -128,8 +128,9 @@ class SaveOp : public framework::OperatorBase { fout.close(); } - SaveSelectedRows(const std::string &filename, const platform::Place &place, - framework::Variable *var) { + void SaveSelectedRows(const std::string &filename, + const platform::Place &place, + framework::Variable *var) const { auto &selectedRows = var->Get(); // get device context from pool -- GitLab