X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=test-dagnn.lua;h=d7179cc1b5110edb2b6666ce8a1604f6fe6d2102;hb=31dc42fc93ed12491ceb10ef3bfc4296878380ee;hp=3b1e66a2f2ef13d602c24e20e1f5f6841e01cf39;hpb=60568def49e4c624e54f53b4be5783d6cfbe1ea9;p=dagnn.git diff --git a/test-dagnn.lua b/test-dagnn.lua index 3b1e66a..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)