From 52d3903a1208747c2e3c97b90bb0f48e08f7a85b Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Wed, 19 Dec 2018 10:03:36 +0800 Subject: [PATCH] fix test=develop --- paddle/fluid/framework/operator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index a7bee3344..e023d165b 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -575,7 +575,7 @@ class RuntimeInferShapeContext : public InferShapeContext { bool HasInputs(const std::string& name) const override { const auto& ins = ctx_.inputs; auto it = ins.find(name); - if (it == ins.end()) { + if (it == ins.end() || it->second.empty()) { return false; } for (auto& input : it->second) { @@ -589,7 +589,7 @@ class RuntimeInferShapeContext : public InferShapeContext { bool HasOutputs(const std::string& name) const override { const auto& outs = ctx_.outputs; auto it = outs.find(name); - if (it == outs.end()) { + if (it == outs.end() || it->second.empty()) { return false; } for (auto& output : it->second) { -- GitLab