X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-dagnn.lua;h=d7179cc1b5110edb2b6666ce8a1604f6fe6d2102;hb=31dc42fc93ed12491ceb10ef3bfc4296878380ee;hp=6c09f95298a072c7fe32ca3b4ad430755f6fb1c6;hpb=da3a60ffa7e1a39e4d01b405c2d80d84c3722c2c;p=dagnn.git diff --git a/test-dagnn.lua b/test-dagnn.lua index 6c09f95..d7179cc 100755 --- a/test-dagnn.lua +++ b/test-dagnn.lua @@ -42,17 +42,22 @@ g:addEdge(b, c) g:addEdge(b, d) g:addEdge(d, f) -g:setInput({a}) -g:setOutput({e,f}) +g:setInput({{a}}) +g:setOutput({ e, f }) g:print() input = torch.Tensor(3, 10):uniform() -output = g:updateOutput({input}) +output = g:updateOutput({{ input }}) printTensorTable(output) ---------------------------------------------------------------------- --- gradInput = g:updateGradInput({ input }, output) +print('******************************************************************') +print('** updateGradInput ***********************************************') +print('******************************************************************') +gradInput = g:updateGradInput({{input}}, output) + +printTensorTable(gradInput)