diff options
author | Howard Su <howard0su@gmail.com> | 2016-11-12 18:35:58 +0300 |
---|---|---|
committer | Howard Su <howard0su@gmail.com> | 2016-11-12 18:35:58 +0300 |
commit | fcd7b5ed3aa1b3d29676ea0748ad835fba7f975f (patch) | |
tree | 9b293836a470ac50c39103032c2314ecc2c8a0cd /test.lua | |
parent | 7cff722b9f0e5c17793e8470551c6de7a8d6c1ff (diff) |
Don't reference HalfTensor when it doesn't exist
Diffstat (limited to 'test.lua')
-rw-r--r-- | test.lua | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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() |