Make the behavior of data nullptr check of pooling layer same as others. (#3322)
authorLigeng Zhu <Lyken17@users.noreply.github.com>
Sat, 8 Jun 2019 16:17:29 +0000 (12:17 -0400)
committerTianqi Chen <tqchen@users.noreply.github.com>
Sat, 8 Jun 2019 16:17:29 +0000 (09:17 -0700)
3rdparty/dmlc-core
src/relay/op/nn/pooling.cc

index fbe142b..3943914 160000 (submodule)
@@ -1 +1 @@
-Subproject commit fbe142b267a8edd1f1188fa2140d88f7ae308661
+Subproject commit 3943914eed66470bd010df581e29e4dca4f7df6f
index 4dd763b..44c9f89 100644 (file)
@@ -70,7 +70,8 @@ bool Pool2DRel(const Array<Type>& types,
   CHECK_EQ(types.size(), 2);
   const auto* data = types[0].as<TensorTypeNode>();
 
-  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";