X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=test-dagnn.lua;h=32eed5724f5ea84c8e55fe966b54e53021013902;hb=34ed0d49d9b6b03811cd92c9513edf4ec5d4d2d2;hp=434f662ae37b4bee93bc36ebf8177095d11455a6;hpb=e5030cca047eed4b8c5db172fc52e893b1b1d843;p=dagnn.git diff --git a/test-dagnn.lua b/test-dagnn.lua index 434f662..32eed57 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) ---------------------------------------------------------------------- +print('******************************************************************') +print('** updateGradInput ***********************************************') +print('******************************************************************') gradInput = g:updateGradInput({ input }, output) + +printTensorTable(gradInput)