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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2012-09-28 16:42:39 +0400
committerRonan Collobert <ronan@collobert.com>2012-09-28 16:42:39 +0400
commit693ef8f04e53c97a6a7c6dcb73db7865f51b0a65 (patch)
tree4f84983050e0552504e3cfc685162b1ea59a8b24
parent4ab4266cef217f9965d2393488fae4c5257e8682 (diff)
nn test: reduced a bit the sizes to avoid time/memory crazyness
-rw-r--r--test/test.lua35
1 files changed, 16 insertions, 19 deletions
diff --git a/test/test.lua b/test/test.lua
index 257536c..7b20bc7 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -678,15 +678,13 @@ end
function nntest.SpatialConvolutionMM()
local from = math.random(1,10)
local to = math.random(1,10)
- local ki = math.random(1,10)
- local kj = math.random(1,10)
- local si = math.random(1,4)
- local sj = math.random(1,4)
+ local ki = math.random(1,5)
+ local kj = math.random(1,5)
local outi = math.random(10,20)
local outj = math.random(10,20)
- local ini = (outi-1)*si+ki
- local inj = (outj-1)*sj+kj
- local module = nn.SpatialConvolutionMM(from, to, ki, kj, si, sj)
+ local ini = outi-1+ki
+ local inj = outj-1+kj
+ local module = nn.SpatialConvolutionMM(from, to, ki, kj)
local input = torch.Tensor(from, inj, ini):zero()
-- stochastic
@@ -722,9 +720,9 @@ function nntest.SpatialConvolutionMM()
local batch = math.random(2,5)
outi = math.random(4,8)
outj = math.random(4,8)
- ini = (outi-1)*si+ki
- inj = (outj-1)*sj+kj
- module = nn.SpatialConvolutionMM(from, to, ki, kj, si, sj)
+ ini = outi-1+ki
+ inj = outj-1+kj
+ module = nn.SpatialConvolutionMM(from, to, ki, kj)
input = torch.Tensor(batch,from,inj,ini):zero()
local err = jac.testJacobian(module, input)
@@ -845,8 +843,8 @@ end
function nntest.SpatialSubSamplingBatchCompare()
local from = math.random(1,10)
- local ki = math.random(1,10)
- local kj = math.random(1,10)
+ local ki = math.random(1,5)
+ local kj = math.random(1,5)
local si = math.random(1,4)
local sj = math.random(1,4)
local outi = math.random(10,20)
@@ -861,8 +859,8 @@ end
function nntest.SpatialSubSampling()
local from = math.random(1,10)
- local ki = math.random(1,10)
- local kj = math.random(1,10)
+ local ki = math.random(1,5)
+ local kj = math.random(1,5)
local si = math.random(1,4)
local sj = math.random(1,4)
local outi = math.random(10,20)
@@ -941,10 +939,9 @@ function nntest.SpatialSubSampling()
end
function nntest.SpatialMaxPooling()
- local from = math.random(1,10)
- local to = math.random(1,10)
- local ki = math.random(1,10)
- local kj = math.random(1,10)
+ local from = math.random(1,5)
+ local ki = math.random(1,5)
+ local kj = math.random(1,5)
local si = math.random(1,4)
local sj = math.random(1,4)
local outi = math.random(10,20)
@@ -1070,7 +1067,7 @@ function nntest.TemporalConvolution()
end
function nntest.TemporalSubSampling()
- local from = math.random(1,10)
+ local from = math.random(1,5)
local ki = math.random(1,10)
local si = math.random(1,4)
local outi = math.random(10,20)