Commit 392eb60d by reminisce Committed by Tianqi Chen

Fix infer shape bug (#148)

parent 35f36fa4
......@@ -108,7 +108,7 @@ Graph InferAttr(Graph &&ret,
uint32_t eid = idx.entry_id(nid, igrad[i].index);
if (fis_none(rshape[eid])) {
rshape[eid] = rshape[idx.entry_id(fnode.inputs[i])];
} else {
} else if (!fis_none(rshape[idx.entry_id(fnode.inputs[i])])) {
CHECK_EQ(rshape[eid], rshape[idx.entry_id(fnode.inputs[i])])
<< "Backward shape inconsistent with the forward shape";
}
......
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