Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

fix shape infer bug #9

Merged
merged 1 commit into from
Oct 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix shape infer bug
  • Loading branch information
ZihengJiang committed Oct 28, 2016
commit c4fed46281202bae6c37fe21323c2527005ebee3
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