diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-02-17 05:30:53 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-02-17 05:30:53 +0300 |
commit | 18cc46a6cfb17859b1e3e83fb26a2167f7361bc5 (patch) | |
tree | 20e386be0c3a00a6b4c58df2f1fc26f1a154f9e3 /test | |
parent | f994513195f4007e084bc6d252101caa470e008d (diff) |
to unit tests, add 1x1 case
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test.lua b/test/test.lua index d3a7e35..3ca3712 100644 --- a/test/test.lua +++ b/test/test.lua @@ -13,10 +13,10 @@ function cudnntest.SpatialConvolution_forward_batch() local bs = math.random(1,32) local from = math.random(1,32) local to = math.random(1,64) - local ki = math.random(3,15) - local kj = math.random(3,15) - local si = 1 -- not supported by CPU version yet - local sj = si + local ki = math.random(1,15) + local kj = math.random(1,15) + local si = math.random(1,ki) + local sj = math.random(1,kj) local outi = math.random(1,64) local outj = math.random(1,64) local ini = (outi-1)*si+ki @@ -39,10 +39,10 @@ function cudnntest.SpatialConvolution_backward_batch() local bs = math.random(1,32) local from = math.random(1,32) local to = math.random(1,64) - local ki = math.random(3,15) - local kj = math.random(3,15) - local si = math.random(1,ki-1) - local sj = math.random(1,kj-1) + local ki = math.random(1,15) + local kj = math.random(1,15) + local si = math.random(1,ki) + local sj = math.random(1,kj) local outi = math.random(1,64) local outj = math.random(1,64) local ini = (outi-1)*si+ki @@ -87,10 +87,10 @@ end function cudnntest.SpatialConvolution_forward_single() local from = math.random(1,32) local to = math.random(1,64) - local ki = math.random(3,15) - local kj = math.random(3,15) - local si = 1 -- not supported by CPU version yet - local sj = si + local ki = math.random(1,15) + local kj = math.random(1,15) + local si = math.random(1,ki) + local sj = math.random(1,kj) local outi = math.random(1,64) local outj = math.random(1,64) local ini = (outi-1)*si+ki @@ -115,10 +115,10 @@ end function cudnntest.SpatialConvolution_backward_single() local from = math.random(1,32) local to = math.random(1,64) - local ki = math.random(3,15) - local kj = math.random(3,15) - local si = 1 -- not supported by CPU version yet - local sj = si + local ki = math.random(1,15) + local kj = math.random(1,15) + local si = math.random(1,ki) + local sj = math.random(1,kj) local outi = math.random(1,64) local outj = math.random(1,64) local ini = (outi-1)*si+ki |