Commit 981dabef authored by varun-intel's avatar varun-intel Committed by Scott Cyphers

remove a node from users (#379)

* remove a node from users

* style
parent 5ad1de22
......@@ -50,7 +50,13 @@ namespace ngraph
protected:
Node(const std::string& node_type, const Nodes& arguments);
virtual ~Node() {}
virtual ~Node()
{
for (auto arg : m_arguments)
{
arg->m_users.erase(this);
}
}
virtual void generate_adjoints(autodiff::Adjoints& adjoints,
const std::shared_ptr<Node>& 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