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

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeanNaren <taz838@hotmail.co.uk>2016-04-09 00:30:32 +0300
committerSeanNaren <taz838@hotmail.co.uk>2016-04-09 00:30:32 +0300
commit60c5b6a34e70daf7dde6d96f35203bb14bd57ea1 (patch)
tree294061b3d9957f65a865ef3da9b94ef460549528
parent66d9f3e607e28a51a1a7da3c28e9a28680984e68 (diff)
Fixed CPU gradInputs float error
-rw-r--r--CTCCriterion.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/CTCCriterion.lua b/CTCCriterion.lua
index 22f13af..66ddde4 100644
--- a/CTCCriterion.lua
+++ b/CTCCriterion.lua
@@ -47,6 +47,7 @@ function CTCCriterion:updateGradInput(output, labels)
if (output:type() == 'torch.CudaTensor') then
gpu_ctc(acts, grads, labels, sizes)
else
+ grads = grads:float()
cpu_ctc(acts:float(), grads:float(), labels, sizes)
end
self.gradInput = self:revertBatching(grads, tensorSizes):typeAs(output)