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:
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)