From 55c6ecbec85468147813ff5850e57f5f2b2aa15c Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 16 Jan 2017 07:39:43 +0100 Subject: [PATCH] Test DAG:setLabel() --- test-dagnn.lua | 4 ++++ 1 file changed, 4 insertions(+) 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() -- 2.39.5