Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to show an nnGraph plot in iTorch
require 'graph';
require 'os';
function displayGraph(g, forward)
local imgFile = os.tmpname() .. '.png'
local dag = g.fg
if forward == false then
dag = g.bg
end
graph.graphvizFile(dag, 'dot', imgFile)
itorch.image(image.load(imgFile))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.