function [nngen/basic_type.py:__Operator collect_numerics] is too busy
RyusukeYamano opened this issue · comments
The function does not terminate in deep (& complex) networks because it re-explores the already explored ”args” when exploring the computational graph.
Lines 476 to 484 in 2a30d83
This seems to work well.
def collect_numerics(self, ret=set()):
ret.add(self)
for arg in self.args:
if arg not in ret:
ret = ret.union(arg.collect_numerics(), ret)
return ret
Is this fine?
def collect_numerics(self, ret=set()):
ret.add(self)
for arg in self.args:
if arg not in ret:
ret = arg.collect_numerics(ret)
return ret
Fixed in 6d26c8c