Added graph.pdf generated from graph.dot.
authorFrancois Fleuret <francois@fleuret.org>
Fri, 3 Feb 2017 19:53:51 +0000 (20:53 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Fri, 3 Feb 2017 19:53:51 +0000 (20:53 +0100)
graph.pdf [new file with mode: 0644]
test-dagnn.lua

diff --git a/graph.pdf b/graph.pdf
new file mode 100644 (file)
index 0000000..f4aa139
Binary files /dev/null and b/graph.pdf differ
index 2db93c6..b390a29 100755 (executable)
@@ -104,9 +104,12 @@ dag:setLabel(a, 'first module')
 dag:setInput(a)
 dag:setOutput({ d, e })
 
--- Check the output of the dot file
-print('Writing /tmp/graph.dot')
-dag:saveDot('/tmp/graph.dot')
+-- Check the output of the dot file. Generate a pdf with:
+--
+-- dot ./graph.dot -Lg -T pdf -o ./graph.pdf
+--
+print('Writing ./graph.dot')
+dag:saveDot('./graph.dot')
 
 -- Let's make a model where the dag is inside another nn.Container.
 model = nn.Sequential()
@@ -133,8 +136,8 @@ print('Gradient estimate error ' .. checkGrad(model, criterion, input, output, e
 
 -- Check that we can save and reload the model
 model:clearState()
-torch.save('/tmp/test.t7', model)
-local otherModel = torch.load('/tmp/test.t7')
+torch.save('./test.t7', model)
+local otherModel = torch.load('./test.t7')
 print('Gradient estimate error ' .. checkGrad(otherModel, criterion, input, output, epsilon))
 
 dag:print()