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

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-07-27 19:35:31 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-07-27 19:35:31 +0400
commit8cc903ad7f2c472a0047d6f65e12f1129a4db174 (patch)
treefdd98ae23eb0817deb517272004bf70acd46e57d
parent3cb787232e9a1489f31d0d32fc821d0803221651 (diff)
Fixed a few tests.
-rw-r--r--test/test-all.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test-all.lua b/test/test-all.lua
index e1a847c..148e860 100644
--- a/test/test-all.lua
+++ b/test/test-all.lua
@@ -33,7 +33,7 @@ function nnxtest.SpatialLinear()
local out = module:forward(in1)
local ground = moduleg:forward(in1:select(2,1,1):select(2,1,1))
local err = out:dist(ground)
- mytester:asserteq(err, 0, torch.typename(module) .. ' - forward err ')
+ mytester:assertlt(err, precision, torch.typename(module) .. ' - forward err ')
local fanin = math.random(1,10)
local fanout = math.random(1,10)
@@ -301,7 +301,7 @@ function nnxtest.SpatialConvolution()
mytester:asserteq(berr, 0, torch.typename(module) .. ' - i/o backward err ')
end
-function nnxtest.SpatialConvolutionTable_1()
+function nnxtest.SpatialConvolutionSparse_1()
local from = math.random(1,10)
local to = math.random(1,10)
local ini = math.random(10,20)
@@ -312,7 +312,7 @@ function nnxtest.SpatialConvolutionTable_1()
local sj = math.random(1,1)
local ct = nn.tables.full(from,to)
- local module = nn.SpatialConvolutionTable(ct, ki, kj, si, sj)
+ local module = nn.SpatialConvolutionSparse(ct, ki, kj, si, sj)
local input = torch.Tensor(from, inj, ini):zero()
module:reset()
@@ -330,7 +330,7 @@ function nnxtest.SpatialConvolutionTable_1()
mytester:asserteq(berr, 0, torch.typename(module) .. ' - i/o backward err ')
end
-function nnxtest.SpatialConvolutionTable_2()
+function nnxtest.SpatialConvolutionSparse_2()
local from = math.random(1,10)
local to = math.random(1,10)
local ini = math.random(10,20)
@@ -341,7 +341,7 @@ function nnxtest.SpatialConvolutionTable_2()
local sj = math.random(1,1)
local ct = nn.tables.oneToOne(from)
- local module = nn.SpatialConvolutionTable(ct, ki, kj, si, sj)
+ local module = nn.SpatialConvolutionSparse(ct, ki, kj, si, sj)
local input = torch.Tensor(from, inj, ini):zero()
module:reset()
@@ -359,7 +359,7 @@ function nnxtest.SpatialConvolutionTable_2()
mytester:asserteq(berr, 0, torch.typename(module) .. ' - i/o backward err ')
end
-function nnxtest.SpatialConvolutionTable_3()
+function nnxtest.SpatialConvolutionSparse_3()
local from = math.random(2,6)
local to = math.random(4,8)
local ini = math.random(10,20)
@@ -370,7 +370,7 @@ function nnxtest.SpatialConvolutionTable_3()
local sj = math.random(1,1)
local ct = nn.tables.random(from,to,from-1)
- local module = nn.SpatialConvolutionTable(ct, ki, kj, si, sj)
+ local module = nn.SpatialConvolutionSparse(ct, ki, kj, si, sj)
local input = torch.Tensor(from, inj, ini):zero()
module:reset()