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-01-11 03:28:42 +0300
committerGitHub <noreply@github.com>2017-01-11 03:28:42 +0300
commitae794a24e1ec671c4ec974970050204a4a15be4a (patch)
treedae4a3d2b93cb4d6b2c80aaf6b877cd22d5edfe7
parent99bc14eac2e3653adb87348e28d39ec1f40012b0 (diff)
parentbc3b4329816e82f791a7a6479c48a661ad3d5db4 (diff)
Merge pull request #312 from soumith/ngimel-mathfloor
Fix for #311
-rw-r--r--RNN.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/RNN.lua b/RNN.lua
index 4597da1..4bb5a98 100644
--- a/RNN.lua
+++ b/RNN.lua
@@ -61,7 +61,7 @@ function RNN:reset(stdv)
self.datatype)
local weightSize = tonumber(weightSizePtr[0])
local elemSize = self.weight:elementSize()
- weightSize = torch.floor((weightSize + elemSize - 1) / elemSize)
+ weightSize = math.floor((weightSize + elemSize - 1) / elemSize)
self.weight:resize(weightSize)
self.weight:uniform(-stdv, stdv)
self.gradWeight:resizeAs(self.weight):zero()
@@ -350,7 +350,7 @@ function RNN:updateOutput(input)
reserveSizePtr)
local reserveSize = tonumber(reserveSizePtr[0])
local elemSize = self.reserve:elementSize()
- reserveSize = torch.floor((reserveSize + elemSize - 1) / elemSize)
+ reserveSize = math.floor((reserveSize + elemSize - 1) / elemSize)
self.reserve:resize(reserveSize)
errcheck('cudnnRNNForwardTraining',
cudnn.getHandle(),