Skip to content

Commit

Permalink
Fix infer shape bug (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce authored and tqchen committed Sep 21, 2017
1 parent d00545a commit e75c53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pass/infer_shape_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit e75c53e

Please sign in to comment.