diff options
author | Ronan Collobert <ronan@collobert.com> | 2015-03-18 19:16:11 +0300 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2015-03-18 19:16:11 +0300 |
commit | 6b0a15f3f3f811f483ecd07e91d2f89a01bf4d6d (patch) | |
tree | 1382ceec9b6c5ea4079f306cbc015f704d785ffa /test.lua | |
parent | f04886e0f3c0ca7354b71b2872a7caeca434e59a (diff) |
fix special View case with -1 arg and dimension set <> 1
added test case
Diffstat (limited to 'test.lua')
-rw-r--r-- | test.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2738,6 +2738,13 @@ function nntest.View() minibatch:nElement(), "Error in minibatch nElement with size -1") + -- another setNumInputDims case + local minibatch = torch.rand(5,4,10) + local module = nn.View(-1):setNumInputDims(2) + mytester:assertTableEq(module:forward(minibatch):size(1), + minibatch:size(1), + "Error in minibatch dimension with size -1") + -- Minibatch Generalization local minibatch = torch.rand(5,2,6) local module = nn.View(6) |