From bcc2f2067eec04b5a1404e6685846d8db0966426 Mon Sep 17 00:00:00 2001 From: Siju Samuel Date: Fri, 12 Oct 2018 11:00:47 +0530 Subject: [PATCH] Review comment fix --- src/relay/op/nn/nn.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/relay/op/nn/nn.cc b/src/relay/op/nn/nn.cc index 6536056a672bc..4d89d712bfa2a 100644 --- a/src/relay/op/nn/nn.cc +++ b/src/relay/op/nn/nn.cc @@ -37,17 +37,9 @@ bool DenseRel(const Array& types, Array dshape = data->shape; // validate the weight shape is proper if defined - if (weight != nullptr) { - CHECK(reporter->AssertEQ(weight->shape[0], dshape[dshape.size() - 1])) - << "Dense: shape of weight is inconsistent with input data."; - CHECK(reporter->AssertEQ(weight->shape[1], param->units)) - << "Dense: shape of weight is inconsistent with units."; - } else { - // Assign weight type - std::vector wshape({dshape[dshape.size() - 1], param->units}); - reporter->Assign(types[1], TensorTypeNode::make(wshape, data->dtype)); - } - + // Assign weight type + Array wshape({dshape[dshape.size() - 1], param->units}); + reporter->Assign(types[1], TensorTypeNode::make(wshape, data->dtype)); oshape.Set((oshape.size() - 1), param->units); } else { if (weight == nullptr) return false;