diff options
author | Gregory Chanan <gchanan@fb.com> | 2016-11-03 19:22:27 +0300 |
---|---|---|
committer | Gregory Chanan <gchanan@fb.com> | 2016-11-09 00:46:52 +0300 |
commit | b0444c9da3367e44a0de17d8250742906b47ce46 (patch) | |
tree | ef9380d5e5ad0af47493ae2be1e3e6d99a7e4b9b /lib/THCUNN/generic/SpatialDilatedMaxPooling.cu | |
parent | 9fd7a885be5db599adcb868494632a3fe0de0205 (diff) |
ArgCheck that dilation parameters are > 0 and ensure tests
pick dilation parameters > 0.
Diffstat (limited to 'lib/THCUNN/generic/SpatialDilatedMaxPooling.cu')
-rw-r--r-- | lib/THCUNN/generic/SpatialDilatedMaxPooling.cu | 2 |
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; |