torch / nngraph

Graph Computation for nn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

questions on recursively traverse the every node in nngraph

eriche2016 opened this issue · comments

What if I build a model named my_module by using nngraph submodules, that is, In the model, other than naive node, there is also a nngraph module type node, however my_module.forwardnodes will not return the the node directly in the nngraph submodule for me to access. I try to solved it recursively tranverse the table of nodes. Is there some clean way to do that? hope someone give me tips

@eriche2016 you can loop over: my_module.modules which is a table containing all the modules in the graph.

Problem has already been solved, thank you very much.