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:
authorsoumith <soumith@fb.com>2017-03-01 04:05:23 +0300
committersoumith <soumith@fb.com>2017-03-01 04:05:23 +0300
commit4b224e83655d6fad6d6711aaa2d5431866f14197 (patch)
tree8352b2e68f5715bc386241fcc13aa241dc0afbf2
parentfb430dc56d139c10999ba6085ae30dbdce4d5340 (diff)
luajit fix
-rw-r--r--RNN.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/RNN.lua b/RNN.lua
index dc8e543..80ee760 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 jit 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