From 459690ae3ba23a2edb79119a0cc12d70086f3068 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Tue, 19 Jun 2018 10:04:48 +0800 Subject: [PATCH] bug fux --- paddle/fluid/operators/save_op.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/operators/save_op.cc b/paddle/fluid/operators/save_op.cc index 7a0b566ea87..d43216749cd 100644 --- a/paddle/fluid/operators/save_op.cc +++ b/paddle/fluid/operators/save_op.cc @@ -132,11 +132,8 @@ class SaveOp : public framework::OperatorBase { void SaveSelectedRows(const framework::Scope &scope, const platform::Place &place, framework::Variable *var) const { - - auto lt_varname = string::Sprintf("%s.path", Input("X")); - auto *lt_var = scope.FindVar(lt_varname)->GetMutable(); - PADDLE_ENFORCE(lt_var != nullptr, "Cannot find variable %s for SaveSelectedRows", - lt_varname); + auto *lt_var = scope.FindVar("loopup_table_path")->GetMutable(); + PADDLE_ENFORCE(lt_var != nullptr, "Cannot find variable loopup_table_path for SaveSelectedRows"); std::string filename = lt_var->data(); VLOG(4) << "SaveSelectedRows get File name: " << filename; -- GitLab