From 3dd274657fb20c17e02fb2f76e1169b218828d93 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Wed, 16 May 2018 19:08:15 +0800 Subject: [PATCH] modify Get -> GetMutable --- paddle/fluid/operators/checkpoint_load_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/checkpoint_load_op.cc b/paddle/fluid/operators/checkpoint_load_op.cc index 241886e2b..72cfccaaa 100644 --- a/paddle/fluid/operators/checkpoint_load_op.cc +++ b/paddle/fluid/operators/checkpoint_load_op.cc @@ -86,11 +86,11 @@ class CheckpointLoadOp : public framework::OperatorBase { var_file.append(inp_var_names[i]); VLOG(3) << "ready to load var: " << inp_var_names[i]; - auto &tensor = var->Get(); + auto *tensor = var->GetMutable(); std::ifstream fin(var_file); PADDLE_ENFORCE(static_cast(fin), "Cannot open file %s for load op", var_file); - DeserializeFromStream(fin, tensor, dev_ctx); + framework::DeserializeFromStream(fin, tensor, dev_ctx); fin.close(); VLOG(3) << " load var: " << inp_var_names[i] << " finished"; -- GitLab