Skip to content

Commit

Permalink
Review comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siju-samuel committed Oct 12, 2018
1 parent 5eee8f7 commit bcc2f20
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/relay/op/nn/nn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,9 @@ bool DenseRel(const Array<Type>& types,
Array<tvm::Expr> 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<IndexExpr> wshape({dshape[dshape.size() - 1], param->units});
reporter->Assign(types[1], TensorTypeNode::make(wshape, data->dtype));
}

// Assign weight type
Array<IndexExpr> 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;
Expand Down

0 comments on commit bcc2f20

Please sign in to comment.