Commit ca569f0e authored by Scott Cyphers's avatar Scott Cyphers

Update map correctly; fixes autodiff from two sources bug.

parent 4a800845
......@@ -160,6 +160,6 @@ void autodiff::Adjoints::add_delta(const std::shared_ptr<Node>& x,
}
else
{
m_adjoint_map.insert({x.get(), std::make_shared<op::Add>(adjoint_it->second, delta)});
adjoint_it->second = std::make_shared<op::Add>(adjoint_it->second, delta);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment