From 455436e5148ad0a84cae89e46931e4785c57870d Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 2 Oct 2017 18:04:00 -0700 Subject: [PATCH] fix compile problem --- paddle/framework/operator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/framework/operator.h b/paddle/framework/operator.h index 2874237b9c3..5bb5c8e2f9f 100644 --- a/paddle/framework/operator.h +++ b/paddle/framework/operator.h @@ -22,6 +22,7 @@ limitations under the License. */ #include "op_info.h" #include "paddle/framework/attribute.h" +#include "paddle/framework/block_desc.h" #include "paddle/framework/data_type.h" #include "paddle/framework/framework.pb.h" #include "paddle/framework/lod_tensor.h" @@ -349,7 +350,7 @@ class CompileTimeInferShapeContext : public InferShapeContextBase { const std::vector& output_names = op_.Output(name); PADDLE_ENFORCE_GT(output_names.size(), 0UL, "Inputs(%s) length is 0", name); for (auto& output : output_names) { - if (!block_.HasVar(name)) return false; + if (!block_.HasVar(output)) return false; } return true; } -- GitLab