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

Commit

Permalink
Fix autograd crash
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Mar 15, 2019
1 parent a2f8f4c commit 077ade6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imperative/imperative.cc
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ std::vector<NDArray*> Imperative::Backward(
std::vector<NodeEntry> ograd_entries;
ograd_entries.reserve(ograds.size());
for (size_t i = 0; i < outputs.size(); ++i) {
ograd_entries.emplace_back();
ograd_entries.emplace_back(NodeEntry{Node::Create(), 0, 0});
AGInfo& info = AGInfo::Create(ograd_entries.back().node);
info.ctx = outputs[i]->ctx();
if (ograds[i] != nullptr) {
Expand Down

0 comments on commit 077ade6

Please sign in to comment.