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:
authorSoumith Chintala <soumith@gmail.com>2015-01-16 23:01:47 +0300
committerSoumith Chintala <soumith@gmail.com>2015-01-16 23:01:47 +0300
commit04d931f16f42660d28b66fce17f1f59d827fcf72 (patch)
treede13ce2049506eba18310733216cae7447a5ae4f /test.lua
parent44dffdc6b2f227faef47cee60901d0ca73ade2f7 (diff)
Revert "Added SpatialAdaptiveMaxPooling"
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/test.lua b/test.lua
index 889675a..ab91abb 100644
--- a/test.lua
+++ b/test.lua
@@ -1678,37 +1678,6 @@ function nntest.SpatialAveragePooling()
mytester:assertTensorEq(gradInput, gradInput2, 0.000001, torch.typename(module) .. ' backward err (Batch) ')
end
-function nntest.SpatialAdaptiveMaxPooling()
- local from = math.random(1,5)
- local ki = math.random(1,12)
- local kj = math.random(1,12)
- local ini = math.random(1,64)
- local inj = math.random(1,64)
-
- local module = nn.SpatialAdaptiveMaxPooling(ki,kj)
- local input = torch.rand(from,ini,inj)
-
- local err = jac.testJacobian(module, input)
- mytester:assertlt(err, precision, 'error on state ')
-
- local ferr, berr = jac.testIO(module, input)
- mytester:asserteq(ferr, 0, torch.typename(module) .. ' - i/o forward err ')
- mytester:asserteq(berr, 0, torch.typename(module) .. ' - i/o backward err ')
-
- -- batch
- local nbatch = math.random(2,5)
- input = torch.rand(nbatch,from,ini,inj)
- module = nn.SpatialAdaptiveMaxPooling(ki,kj)
-
- local err = jac.testJacobian(module, input)
- mytester:assertlt(err, precision, 'error on state (Batch) ')
-
- local ferr, berr = jac.testIO(module, input)
- mytester:asserteq(ferr, 0, torch.typename(module) .. ' - i/o forward err (Batch) ')
- mytester:asserteq(berr, 0, torch.typename(module) .. ' - i/o backward err (Batch) ')
-
-end
-
function nntest.SpatialLPPooling()
local fanin = math.random(1,4)
local osizex = math.random(1,4)