torch / nngraph

Graph Computation for nn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One problem with gmodule.lua

zhangty12 opened this issue · comments

On gmodule.lua : line-337, the reassignment " input = input[1] " seems problematic.

Say, if the module associated with the node is a JoinTable(1), and the input is a singleton {torch.randn(5, 5)}, the program may crash as gmodule would send a tensor torch.randn(5, 5) directly to JoinTable(1):forward(***), instead of a table {torch.randn(5, 5)}.

Therefore, when wrapped up in a gmodule, JoinTable():forward(**) cannot accept singletons as their inputs, and so this contradicts JoinTable's original functionality.