questions on recursively traverse the every node in nngraph
eriche2016 opened this issue · comments
Xinwei He commented
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
Soumith Chintala commented
@eriche2016 you can loop over: my_module.modules which is a table containing all the modules in the graph.
Xinwei He commented
Problem has already been solved, thank you very much.