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

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarris <marris@google.com>2015-06-18 20:08:10 +0300
committermarris <marris@google.com>2015-06-18 20:08:10 +0300
commita06dcaeb88f05678132c37d3a98c3aad0fb441b8 (patch)
treed608e1b3a710a05945168555e08b31e7e6664089
parentfed11c52fa5b3e03a0548d612d5f507b328a3800 (diff)
Added a primitive test file for gaussianpyramid
-rw-r--r--test/test_gaussianpyramid.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_gaussianpyramid.lua b/test/test_gaussianpyramid.lua
new file mode 100644
index 0000000..f0fc603
--- /dev/null
+++ b/test/test_gaussianpyramid.lua
@@ -0,0 +1,25 @@
+require 'totem'
+require 'image'
+
+
+local tester = totem.Tester()
+
+
+local tests = {}
+
+function tests.doesNotCrash()
+ -- Char, Short and Int tensors not supported.
+ types = {
+ 'torch.ByteTensor',
+ 'torch.FloatTensor',
+ 'torch.DoubleTensor'
+ }
+ for _, type in ipairs(types) do
+ local output = unpack(image.gaussianpyramid(torch.rand(8, 8):type(type), {0.5}))
+ tester:assert(output:type() == type, 'Type ' .. type .. ' produces a different output.')
+ end
+end
+
+
+return tester:add(tests):run()
+