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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Simonovsky <simonovm@imagine.enpc.fr>2016-10-02 15:36:54 +0300
committerMartin Simonovsky <simonovm@imagine.enpc.fr>2016-10-02 17:56:32 +0300
commitd88561b8661e594a7b754a0ec3813e72e2696e64 (patch)
tree5b62f96b8c1ec97e24be3b40e036562ec9f17a14 /LookupTable.lua
parentf4cc9ba98d50aadfd71aa00d4e3b4ba9a3338c63 (diff)
More broken compatibility with cutorch 1.0
More broken compatibility with cutorch 1.0
Diffstat (limited to 'LookupTable.lua')
-rw-r--r--LookupTable.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/LookupTable.lua b/LookupTable.lua
index cf9c687..d2a5179 100644
--- a/LookupTable.lua
+++ b/LookupTable.lua
@@ -148,10 +148,10 @@ function LookupTable:type(type, tensorCache)
if type == 'torch.CudaTensor' then
-- CUDA uses _sorted and _indices temporary tensors
- self._sorted = torch.CudaLongTensor.new()
- self._indices = torch.CudaLongTensor.new()
- self._count = torch.CudaLongTensor.new()
- self._input = torch.CudaLongTensor.new()
+ self._sorted = torch.CudaLongTensor and torch.CudaLongTensor.new() or torch.CudaTensor.new()
+ self._indices = torch.CudaLongTensor and torch.CudaLongTensor.new() or torch.CudaTensor.new()
+ self._count = torch.CudaLongTensor and torch.CudaLongTensor.new() or torch.CudaTensor.new()
+ self._input = torch.CudaLongTensor and torch.CudaLongTensor.new() or torch.CudaTensor.new()
else
-- self._count and self._input should only be converted if using Cuda
self._count = torch.IntTensor()