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 19:08:42 +0300
committerivpopov <ivpopov@google.com>2016-02-03 19:08:42 +0300
commit846bf44460cda72b1e306eb8250577ba341b06f3 (patch)
tree36b8d862a522083a0dbf9052523ef36b6287ed5a
parent2caa6e9d30f3a73f67692ef6bcfa9529162069bd (diff)
Added test
-rw-r--r--test/test.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index 48c5a81..6272344 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -221,6 +221,15 @@ function cudnntest.SpatialConvolution_backward_single()
test(sconv, gconv)
end
+function cudnntest.SpatialConvolution_batch_reshape()
+ local gconv = cudnn.SpatialConvolution(4, 8, 4, 4, 2, 2):cuda()
+ local outputBatch = gconv:forward(torch.rand(1, 4, 32, 32):cuda())
+ mytester:asserteq(outputBatch:dim(), 4, 'error in dimension')
+
+ local outputNoBatch = gconv:forward(torch.rand(4, 32, 32):cuda())
+ mytester:asserteq(outputNoBatch:dim(), 3, 'error in dimension')
+end
+
function cudnntest.VolumetricConvolution_forward_single()
local from = math.random(1,16)
local to = math.random(1,16)