Skip to content

Commit

Permalink
Merge pull request tqchen#9 from ZihengJiang/bugfix
Browse files Browse the repository at this point in the history
fix shape infer bug
  • Loading branch information
Ziheng Jiang authored Oct 28, 2016
2 parents 78dedfd + c4fed46 commit 05ba599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ void TorchExecutor::SetupShapeDType(
CHECK(state != nullptr);
CHECK(state->initialized())
<< "Attempt to execute a graph un-initialized Variable";
if (node_shape_->at(nid) != state->blob.shape) {
if (node_shape_->at(idx.entry_id(nid, 0)) != state->blob.shape) {
need_redo_infer = true; break;
}
if (node_dtype_->at(nid) != state->blob.dtype) {
if (node_dtype_->at(idx.entry_id(nid, 0)) != state->blob.dtype) {
need_redo_infer = true; break;
}
}
Expand Down

0 comments on commit 05ba599

Please sign in to comment.