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

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Fomitchev <bfomitchev@nvidia.com>2017-03-01 03:35:27 +0300
committerBoris Fomitchev <bfomitchev@nvidia.com>2017-03-01 03:41:18 +0300
commit1f7f826a5234640986078ed4747374f12bffa784 (patch)
tree22e66b939c845c2708ac255819efa8feff198f14
parentfb430dc56d139c10999ba6085ae30dbdce4d5340 (diff)
Resolving luajit/lua5.2 conflict
-rw-r--r--RNN.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/RNN.lua b/RNN.lua
index dc8e543..2836228 100644
--- a/RNN.lua
+++ b/RNN.lua
@@ -613,7 +613,12 @@ local function retrieveLinearParams(self, cuDNNMethod)
nbDims:data(),
filterDimA:data())
- local offset = (tonumber(matrixPointer[0]) - tonumber(self.weight:data()))/self.weight:elementSize()
+ local offset
+ if type(jit) == 'table' then
+ offset = matrixPointer[0] - self.weight:data()
+ else
+ offset = (tonumber(matrixPointer[0]) - tonumber(self.weight:data()))/self.weight:elementSize()
+ end
local params = torch.CudaTensor(self.weight:storage(), offset + self.weight:storageOffset(), filterDimA:prod())
table.insert(layerInfo, params)
end