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

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Zagoruyko <zagoruyko2@gmail.com>2016-08-02 18:37:30 +0300
committerGitHub <noreply@github.com>2016-08-02 18:37:30 +0300
commita50b2f4061e5014b24b70b8ffa6db0136f956b17 (patch)
tree3743035c69a09f54fddca03b9f986b56e458a9b9
parente47ae3f56ac25e536aa8843408a87a4d5e1bdf18 (diff)
parentf3586546caeed9918c0235007650657083c44a64 (diff)
Merge pull request #227 from szagoruyko/pooling-assert
Assert if pooling output is less than 0
-rw-r--r--Pooling.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/Pooling.lua b/Pooling.lua
index 45afccb..53220f1 100644
--- a/Pooling.lua
+++ b/Pooling.lua
@@ -61,6 +61,7 @@ function Pooling:createIODescriptors(input)
oW = math.floor((input:size(4)+self.padW*2 - self.kW)/self.dW + 1)
oH = math.floor((input:size(3)+self.padH*2 - self.kH)/self.dH + 1)
end
+ assert(oW > 0 and oH > 0, 'input image smaller than kernel')
self.output:resize(input:size(1), input:size(2), oH, oW)
-- create input/output descriptor