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-07-19 21:58:34 +0300
committerSergey Zagoruyko <zagoruyko2@gmail.com>2016-07-19 21:58:34 +0300
commitf3586546caeed9918c0235007650657083c44a64 (patch)
treef7469e728ce5ef585ae6f9054ca4d7be59621576
parent3427b3dc615264cb1d4b31cdd6923ab865ef53d3 (diff)
pooling check size assert
-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