From bd244ebd8d070dbee18b49604afd8dfb3ca61983 Mon Sep 17 00:00:00 2001 From: Ligeng Zhu Date: Sat, 8 Jun 2019 12:17:29 -0400 Subject: [PATCH] Make the behavior of data nullptr check of pooling layer same as others. (#3322) --- 3rdparty/dmlc-core | 2 +- src/relay/op/nn/pooling.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index fbe142b2..3943914e 160000 --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit fbe142b267a8edd1f1188fa2140d88f7ae308661 +Subproject commit 3943914eed66470bd010df581e29e4dca4f7df6f diff --git a/src/relay/op/nn/pooling.cc b/src/relay/op/nn/pooling.cc index 4dd763b4..44c9f89a 100644 --- a/src/relay/op/nn/pooling.cc +++ b/src/relay/op/nn/pooling.cc @@ -70,7 +70,8 @@ bool Pool2DRel(const Array& types, CHECK_EQ(types.size(), 2); const auto* data = types[0].as(); - CHECK(data != nullptr); + if (data == nullptr) return false; + const auto dshape = data->shape; CHECK_GE(dshape.size(), 2U) << "Pool2D only support input >= 2-D: input must have height and width";