diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-01-16 23:01:47 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-01-16 23:01:47 +0300 |
commit | 04d931f16f42660d28b66fce17f1f59d827fcf72 (patch) | |
tree | de13ce2049506eba18310733216cae7447a5ae4f /test.lua | |
parent | 44dffdc6b2f227faef47cee60901d0ca73ade2f7 (diff) |
Revert "Added SpatialAdaptiveMaxPooling"
Diffstat (limited to 'test.lua')
-rw-r--r-- | test.lua | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -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) |