Table Of Contents
Table Of Contents

Symbol.__iter__

Symbol.__iter__()[source]

Returns a generator object of symbol.

One can loop through the returned object list to get outputs.

Example

>>> a = mx.sym.Variable('a')
>>> b = mx.sym.Variable('b')
>>> c = a+b
>>> d = mx.sym.Variable('d')
>>> e = d+c
>>> out = e.get_children()
>>> out
<Symbol Grouped>
>>> for i in out:
...     i
...
<Symbol d>
<Symbol _plus0>