X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-dagnn.lua;h=2db93c67adc784e8afd497279486eb46873b7aee;hb=a7a25093ee35439427cc2a085d63d0d22122e93c;hp=cec37d246451b3eb7f639edbf946e22716d6d979;hpb=501034fda227664ac04ab5dd2d912f768bcd70e4;p=dagnn.git diff --git a/test-dagnn.lua b/test-dagnn.lua index cec37d2..2db93c6 100755 --- a/test-dagnn.lua +++ b/test-dagnn.lua @@ -99,6 +99,8 @@ dag:connect(b, nn.Linear(10, 15), nn.ReLU(), d) dag:connect(c, d) dag:connect(c, e) +dag:setLabel(a, 'first module') + dag:setInput(a) dag:setOutput({ d, e }) @@ -134,3 +136,5 @@ model:clearState() torch.save('/tmp/test.t7', model) local otherModel = torch.load('/tmp/test.t7') print('Gradient estimate error ' .. checkGrad(otherModel, criterion, input, output, epsilon)) + +dag:print()