From 0e43d79b1b75241ec2c5e3a6ba353e92e04ff548 Mon Sep 17 00:00:00 2001 From: Boris Fomitchev Date: Mon, 16 Jan 2017 18:55:07 -0800 Subject: [PATCH] Fixing HalfTensor FIXME --- init.lua | 3 +-- test.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index fd1e319b..6a1ceb6b 100644 --- a/init.lua +++ b/init.lua @@ -9,5 +9,4 @@ require('cunn.DataParallelTable') nn.Module._flattenTensorBuffer['torch.CudaTensor'] = torch.FloatTensor.new nn.Module._flattenTensorBuffer['torch.CudaDoubleTensor'] = torch.DoubleTensor.new --- FIXME: change this to torch.HalfTensor when available -nn.Module._flattenTensorBuffer['torch.CudaHalfTensor'] = torch.FloatTensor.new +nn.Module._flattenTensorBuffer['torch.CudaHalfTensor'] = torch.HalfTensor.new diff --git a/test.lua b/test.lua index c3ed9bb2..159c8b81 100644 --- a/test.lua +++ b/test.lua @@ -24,7 +24,7 @@ local t2cpu = { local function checkHalf() if cutorch.hasHalf then table.insert(typenames, 'torch.CudaHalfTensor') - t2cpu['torch.CudaHalfTensor'] = 'torch.FloatTensor' + t2cpu['torch.CudaHalfTensor'] = 'torch.HalfTensor' end end