X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dagnn.git;a=blobdiff_plain;f=test-dagnn.lua;fp=test-dagnn.lua;h=2db93c67adc784e8afd497279486eb46873b7aee;hp=cec37d246451b3eb7f639edbf946e22716d6d979;hb=55c6ecbec85468147813ff5850e57f5f2b2aa15c;hpb=cd1aa6aaa75f5d5b281be0cfbacd51991b3b1ca3 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()