diff options
author | Gregory Chanan <gchanan@fb.com> | 2016-12-01 20:01:43 +0300 |
---|---|---|
committer | Gregory Chanan <gchanan@fb.com> | 2016-12-01 20:03:21 +0300 |
commit | e1d4be2c8b38dac2e689bf0f742ca3cdbad3361b (patch) | |
tree | 646ff1026d28ae4c9d70f14d565b931182d5ace1 | |
parent | c26131cc79bbe5a90b0e3f82b786af229863148d (diff) |
Generate valid image sizes for VolumetricDilatedMaxPooling tests.
-rw-r--r-- | test.lua | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -4487,9 +4487,9 @@ function cunntest.VolumetricDilatedMaxPooling_forward_batch() local dilationt = math.random(1,10) local dilationi = math.random(1,10) local dilationj = math.random(1,10) - local int = (outt-1)*st+(dilationt*(kt-1)+1)-2*padt - local ini = (outi-1)*si+(dilationi*(ki-1)+1)-2*padi - local inj = (outj-1)*sj+(dilationj*(kj-1)+1)-2*padj + local int = math.max((outt-1)*st+(dilationt*(kt-1)+1)-2*padt, kt) + local ini = math.max((outi-1)*si+(dilationi*(ki-1)+1)-2*padi, ki) + local inj = math.max((outj-1)*sj+(dilationj*(kj-1)+1)-2*padj, kj) local ceil_mode = math.random(0,1) == 1 for k, typename in ipairs(typenames) do @@ -4531,9 +4531,9 @@ function cunntest.VolumetricDilatedMaxPooling_backward_batch() local dilationt = math.random(1,10) local dilationi = math.random(1,10) local dilationj = math.random(1,10) - local int = (outt-1)*st+(dilationt*(kt-1)+1)-2*padt - local ini = (outi-1)*si+(dilationi*(ki-1)+1)-2*padi - local inj = (outj-1)*sj+(dilationj*(kj-1)+1)-2*padj + local int = math.max((outt-1)*st+(dilationt*(kt-1)+1)-2*padt, kt) + local ini = math.max((outi-1)*si+(dilationi*(ki-1)+1)-2*padi, ki) + local inj = math.max((outj-1)*sj+(dilationj*(kj-1)+1)-2*padj, kj) local ceil_mode = math.random(0,1) == 1 for k, typename in ipairs(typenames) do |