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 Chintala <soumith@gmail.com>2017-02-06 10:23:07 +0300
committerGitHub <noreply@github.com>2017-02-06 10:23:07 +0300
commit99592ae1a5d7afbbd98d75e10aa7f6c3fae806ef (patch)
treefab4f993afca0ab9d5c78bb8d9d068cb36bae530
parent8b32e18b815fb94f7723038e95d3ae3aab1a3d64 (diff)
parent0ff6917a73db120a2eb5ce40e871f31411bd03a3 (diff)
Merge pull request #324 from jsenellart-systran/fix-NYI
storageOffset is calculated in element not bytes
-rw-r--r--RNN.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/RNN.lua b/RNN.lua
index c6a1bbf..dc8e543 100644
--- a/RNN.lua
+++ b/RNN.lua
@@ -613,7 +613,7 @@ local function retrieveLinearParams(self, cuDNNMethod)
nbDims:data(),
filterDimA:data())
- local offset = tonumber(matrixPointer[0]) - tonumber(self.weight:data())
+ local offset = (tonumber(matrixPointer[0]) - tonumber(self.weight:data()))/self.weight:elementSize()
local params = torch.CudaTensor(self.weight:storage(), offset + self.weight:storageOffset(), filterDimA:prod())
table.insert(layerInfo, params)
end