Commit bd244ebd by Ligeng Zhu Committed by Tianqi Chen

Make the behavior of data nullptr check of pooling layer same as others. (#3322)

parent 4cee98ba
Subproject commit fbe142b267a8edd1f1188fa2140d88f7ae308661
Subproject commit 3943914eed66470bd010df581e29e4dca4f7df6f
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment