graphviz wrong number of arguments error
yongfei25 opened this issue · comments
Yong Fei commented
Running this (from the example)
require 'nngraph'
h1 = nn.Linear(20, 10)()
h2 = nn.Linear(10, 1)(nn.Tanh()(nn.Linear(10, 10)(nn.Tanh()(h1))))
mlp = nn.gModule({h1}, {h2})
x = torch.rand(20)
dx = torch.rand(1)
mlp:updateOutput(x)
mlp:updateGradInput(x, dx)
mlp:accGradParameters(x, dx)
-- draw graph (the forward graph, '.fg')
graph.dot(mlp.fg, 'MLP', '/home/yongfei')
Got this error.
.. /lua/5.1/graph/graphviz.lua:156: wrong number of arguments for function call
stack traceback:
[C]: in function 'gvRender'
...e/yongfei/torch/install/share/lua/5.1/graph/graphviz.lua:156: in function 'graphvizFile'
...e/yongfei/torch/install/share/lua/5.1/graph/graphviz.lua:181: in function 'dot'
train.lua:154: in main chunk
[C]: in function 'dofile'
...gfei/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:133: in main chunk
What have I missed?
Yong Fei commented
Fixed it by reinstalling graph :)
luarocks install graph