SVG problem when trying on nngraph tutorial

92 views
Skip to first unread message

Tianqi Tang

unread,
Oct 5, 2015, 12:32:23 PM10/5/15
to torch7
Hi,


    But I meet the following error when it comes to graph.dot(mlp.fg, 'MLP', 'MLP_Annotated'):

...s/ttq1008/torch/install/share/lua/5.1/graph/graphviz.lua:152: attempt to call field 'gvContext' (a nil value)
stack traceback:
	...s/ttq1008/torch/install/share/lua/5.1/graph/graphviz.lua:152: in function 'graphvizFile'
	...s/ttq1008/torch/install/share/lua/5.1/graph/graphviz.lua:181: in function 'dot'
	[string "local function get_network()..."]:25: in main chunk
	[C]: in function 'xpcall'
	/Users/ttq1008/torch/install/share/lua/5.1/itorch/main.lua:179: in function </Users/ttq1008/torch/install/share/lua/5.1/itorch/main.lua:143>
	/Users/ttq1008/torch/install/share/lua/5.1/lzmq/poller.lua:75: in function 'poll'
	...s/ttq1008/torch/install/share/lua/5.1/lzmq/impl/loop.lua:307: in function 'poll'
	...s/ttq1008/torch/install/share/lua/5.1/lzmq/impl/loop.lua:325: in function 'sleep_ex'
	...s/ttq1008/torch/install/share/lua/5.1/lzmq/impl/loop.lua:370: in function 'start'
	/Users/ttq1008/torch/install/share/lua/5.1/itorch/main.lua:350: in main chunk
	[C]: in function 'require'
	(command line):1: in main chunk
	[C]: at 0x01017a31a0


    And this line of code is used for drawing a SVG graph. So I think the error comes because I didn't have some SVG package in my PC. 
    So anyone has any idea on which SVG package I should install?


Thanks,
Tianqi

Francisco Vitor Suzano Massa

unread,
Oct 5, 2015, 1:49:35 PM10/5/15
to torch7
I think you need to install graphviz.
Installation instructions can be found here
https://github.com/torch/nngraph#requirements
Reply all
Reply to author
Forward
0 new messages