From 186fb0c1185b6b1b94a7eeac54fa1cbd001debfd Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 14 Aug 2017 16:31:54 +0800 Subject: [PATCH] Remove input_format in backward.cc --- paddle/framework/backward.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/paddle/framework/backward.cc b/paddle/framework/backward.cc index 315bdde76d3..855e2cae20c 100644 --- a/paddle/framework/backward.cc +++ b/paddle/framework/backward.cc @@ -127,11 +127,8 @@ std::shared_ptr BackwardRecursive( net->ops_[op_offset]->Rename(name, dup_outputs.back()); } insert_position.push_back( - {dup_op.back(), - OpRegistry::CreateOp( - "add", {{"X", {dup_outputs}}}, {{"Out", {name}}}, - {{"input_format", - std::vector{0, static_cast(dup_outputs.size())}}})}); + {dup_op.back(), OpRegistry::CreateOp("add", {{"X", {dup_outputs}}}, + {{"Out", {name}}}, {})}); } insert_position.sort( @@ -140,7 +137,6 @@ std::shared_ptr BackwardRecursive( for (auto& pos : insert_position) { net->InsertOp(pos.first + 1, pos.second); } - } else { std::shared_ptr grad_op = OpRegistry::CreateGradOp(forwardOp); @@ -176,7 +172,7 @@ std::shared_ptr BackwardRecursive( net->type_ = "@GENERATED_BACKWARD@"; net->CompleteAddOp(); return net; -} +} // namespace framework // See header for comments std::shared_ptr Backward( -- GitLab