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

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivpopov <ivpopov@google.com>2016-02-03 16:23:29 +0300
committerivpopov <ivpopov@google.com>2016-02-03 16:23:29 +0300
commit0cf12c1ffa2b05533cd65cd3f789a32cf833a50d (patch)
treef8a3c583433196ba0346cdda9e9afc1502b7d86c
parent99883f3633ce8fc0567913a506203630da7ed95f (diff)
Fixed issues with two tests
SpatialCrossEntropyCriterion - inconsistent averageSize normalization VolumetricMaxPooling_batch - will run out of memory: reducing maximal batch size
-rw-r--r--test/test.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test.lua b/test/test.lua
index 48c5a81..ea2ffce 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -329,8 +329,8 @@ function cudnntest.VolumetricConvolution_backward_single()
end
function cudnntest.VolumetricMaxPooling_batch()
- local bs = math.random(1,32)
- local from = math.random(1,32)
+ local bs = math.random(1,4)
+ local from = math.random(1,4)
local ki = math.random(2,4)
local kj = math.random(2,4)
local kk = math.random(2,4)
@@ -1015,6 +1015,11 @@ function cudnntest.SpatialCrossEntropyCriterion()
ggi[{{}, {}, {i}, {j}}]:copy(ggi1)
end
end
+
+ -- nn.CrossEntropy in contrast to cudnn.SpatialCrossEntropyCriterion cannot
+ -- average over the last spatial dimensions because it is run in a loop
+ ggi:div(h * w)
+
local err = (gi - ggi):abs():max()
mytester:assertlt(err, precision_backward, 'error in difference between central difference and :backward')