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