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

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Su <howard0su@gmail.com>2016-11-12 18:35:58 +0300
committerHoward Su <howard0su@gmail.com>2016-11-12 18:35:58 +0300
commitfcd7b5ed3aa1b3d29676ea0748ad835fba7f975f (patch)
tree9b293836a470ac50c39103032c2314ecc2c8a0cd /test.lua
parent7cff722b9f0e5c17793e8470551c6de7a8d6c1ff (diff)
Don't reference HalfTensor when it doesn't exist
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/test.lua b/test.lua
index 7cb2854..1fdfcc8 100644
--- a/test.lua
+++ b/test.lua
@@ -26,9 +26,11 @@ local function checkHalf()
end
-- workarounds for non-existant functions
+if cutorch.hasHalf then
function torch.CudaHalfTensor:mean()
return self:cuda():mean()
end
+end
function torch.CudaDoubleTensor:mean()
return self:cuda():mean()