Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Grewe <dominikg@google.com>2015-07-31 19:24:05 +0300
committerDominik Grewe <dominikg@google.com>2015-07-31 19:24:05 +0300
commit28f2072373fe90fe785fd4ea204f2deff3a521e6 (patch)
treeaed6658032628efcabed09654be04b28b24cc945 /test.lua
parenta648065d8eb0fcafba97c0b679aeeb00ad048e5e (diff)
Update nntest.addSingletonDimension to test adding final dimension.
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test.lua b/test.lua
index 90ebdcc..5b08c37 100644
--- a/test.lua
+++ b/test.lua
@@ -4023,7 +4023,7 @@ function nntest.addSingletonDimension()
mytester:assertTensorEq(firstDim[1], tensor, 0,
"wrong content for singleton dimension 1")
- local dim = torch.random(dims)
+ local dim = torch.random(dims + 1)
local result = nn.utils.addSingletonDimension(tensor, dim)
local resultSize = size:totable()
table.insert(resultSize, dim, 1)