提交 52d3903a 编写于 作者: X Xin Pan

fix

test=develop
上级 0e0983cc
...@@ -575,7 +575,7 @@ class RuntimeInferShapeContext : public InferShapeContext { ...@@ -575,7 +575,7 @@ class RuntimeInferShapeContext : public InferShapeContext {
bool HasInputs(const std::string& name) const override { bool HasInputs(const std::string& name) const override {
const auto& ins = ctx_.inputs; const auto& ins = ctx_.inputs;
auto it = ins.find(name); auto it = ins.find(name);
if (it == ins.end()) { if (it == ins.end() || it->second.empty()) {
return false; return false;
} }
for (auto& input : it->second) { for (auto& input : it->second) {
...@@ -589,7 +589,7 @@ class RuntimeInferShapeContext : public InferShapeContext { ...@@ -589,7 +589,7 @@ class RuntimeInferShapeContext : public InferShapeContext {
bool HasOutputs(const std::string& name) const override { bool HasOutputs(const std::string& name) const override {
const auto& outs = ctx_.outputs; const auto& outs = ctx_.outputs;
auto it = outs.find(name); auto it = outs.find(name);
if (it == outs.end()) { if (it == outs.end() || it->second.empty()) {
return false; return false;
} }
for (auto& output : it->second) { for (auto& output : it->second) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册