Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
graph: bugfix: compute a node many times (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire authored Feb 20, 2019
1 parent 3079787 commit 90643cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/execution-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export class ExecutionPlan {
});

// resolve downstream nodes
const downstreamNodes = new Set<number>();
outputList.forEach((output, i) => {
const j = thisOp.node.outputs[i];
for (const currentDownstreamNodeIndex of graphValues[j].to) {
Expand All @@ -133,10 +134,11 @@ export class ExecutionPlan {
}
}
if (resolved) {
sequence.push(currentDownstreamNodeIndex);
downstreamNodes.add(currentDownstreamNodeIndex);
}
}
});
sequence.push(...downstreamNodes);
}

const output: Tensor[] = [];
Expand Down

0 comments on commit 90643cb

Please sign in to comment.