From: Francois Fleuret Date: Mon, 16 Jan 2017 06:39:43 +0000 (+0100) Subject: Test DAG:setLabel() X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dagnn.git;a=commitdiff_plain;h=55c6ecbec85468147813ff5850e57f5f2b2aa15c Test DAG:setLabel() --- 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()