Commit d2d200e6 authored by Scott Cyphers's avatar Scott Cyphers

Merge branch 'cyphers/autodiff' of…

Merge branch 'cyphers/autodiff' of https://github.com/NervanaSystems/private-ngraph-cpp into cyphers/autodiff
parents e4295511 745c350a
......@@ -148,7 +148,7 @@ std::shared_ptr<Node> autodiff::Adjoints::get(const std::shared_ptr<Node>& x)
if (m_adjoint_map.end() == adjoint_it)
{
auto result = make_zero(x->get_value_type());
adjoint_it = m_adjoint_map.insert(std::make_tuple(x.get(), result)).first;
adjoint_it = m_adjoint_map.insert({x.get(), result}).first;
}
return adjoint_it->second;
}
......@@ -160,11 +160,11 @@ void autodiff::Adjoints::add_delta(const std::shared_ptr<Node>& x,
auto adjoint_it = m_adjoint_map.find(x.get());
if (m_adjoint_map.end() == adjoint_it)
{
m_adjoint_map.insert(std::make_tuple(x.get(), delta));
m_adjoint_map.insert({x.get(), delta});
}
else
{
m_adjoint_map.insert(
std::make_tuple(x.get(), std::make_shared<op::Add>(adjoint_it->second, delta)));
{x.get(), std::make_shared<op::Add>(adjoint_it->second, delta)});
}
}
......@@ -167,7 +167,7 @@ std::shared_ptr<Node> Node::backwards_derivative(const std::shared_ptr<Node>& x,
{
adjoints_it =
m_adjoint_map
.insert(std::make_tuple(c.get(), autodiff::Adjoints(shared_from_this(), c)))
.insert({c.get(), autodiff::Adjoints(shared_from_this(), c)})
.first;
}
return adjoints_it->second.get(x);
......
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