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:
authorClement Farabet <clement.farabet@gmail.com>2012-10-26 00:57:15 +0400
committerClement Farabet <clement.farabet@gmail.com>2012-10-26 00:57:15 +0400
commit82a29d7826d0bec611a699a416c3fcf1cd2eab4f (patch)
tree573806773ca48b26d2b9c125d758988a24af0848
parent1d5b59b9f202f64c854d2267b79e97596a3c1d26 (diff)
Allowing batches of size 1. This was a sneaky corner case.
-rw-r--r--Reshape.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/Reshape.lua b/Reshape.lua
index 753dd17..ef6b15a 100644
--- a/Reshape.lua
+++ b/Reshape.lua
@@ -26,7 +26,7 @@ end
function Reshape:updateOutput(input)
input = input:contiguous()
local nelement = input:nElement()
- if nelement == self.nelement then
+ if nelement == self.nelement and input:size(1) ~= 1 then
self.output:set(input):resize(self.size)
else
self.batchsize[1] = input:size(1)