From: Ligeng Zhu Date: Sat, 8 Jun 2019 16:17:29 +0000 (-0400) Subject: Make the behavior of data nullptr check of pooling layer same as others. (#3322) X-Git-Tag: upstream/0.7.0~2336 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd244ebd8d070dbee18b49604afd8dfb3ca61983;p=platform%2Fupstream%2Ftvm.git Make the behavior of data nullptr check of pooling layer same as others. (#3322) --- diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index fbe142b..3943914 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 4dd763b..44c9f89 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";