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

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/THCUNN/generic/SpatialDilatedMaxPooling.cu')
-rw-r--r--lib/THCUNN/generic/SpatialDilatedMaxPooling.cu2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/THCUNN/generic/SpatialDilatedMaxPooling.cu b/lib/THCUNN/generic/SpatialDilatedMaxPooling.cu
index a44db4a..b99b5e6 100644
--- a/lib/THCUNN/generic/SpatialDilatedMaxPooling.cu
+++ b/lib/THCUNN/generic/SpatialDilatedMaxPooling.cu
@@ -38,7 +38,7 @@ void THNN_(SpatialDilatedMaxPooling_updateOutput)(
THArgCheck(nInputCols >= kW - padW && nInputRows >= kH - padH, 2, "input image smaller than kernel size");
THArgCheck(kW/2 >= padW && kH/2 >= padH, 2, "pad should be smaller than half of kernel size");
-
+ THArgCheck(dilationW > 0 && dilationH > 0, 11, "dilation should be greater than 0");
if(ceil_mode) {
nOutputCols = ceil(float(nInputCols - (dilationW * (kW - 1) + 1) + 2*padW) / float(dW)) + 1;
nOutputRows = ceil(float(nInputRows - (dilationH * (kH - 1) + 1) + 2*padH) / float(dH)) + 1;