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:
authorJean A. Senellart <jean.senellart@systrangroup.com>2017-02-06 10:17:12 +0300
committerJean A. Senellart <jean.senellart@systrangroup.com>2017-02-06 10:17:12 +0300
commit0ff6917a73db120a2eb5ce40e871f31411bd03a3 (patch)
treef7d4b284b0358a68038b05a9ca1446d6dd0eb587
parentb02074db825f72833e151f3f8ca9bb27358251aa (diff)
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 096e316..edf16bc 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