diff options
author | SeanNaren <taz838@hotmail.co.uk> | 2016-04-09 00:30:32 +0300 |
---|---|---|
committer | SeanNaren <taz838@hotmail.co.uk> | 2016-04-09 00:30:32 +0300 |
commit | 60c5b6a34e70daf7dde6d96f35203bb14bd57ea1 (patch) | |
tree | 294061b3d9957f65a865ef3da9b94ef460549528 | |
parent | 66d9f3e607e28a51a1a7da3c28e9a28680984e68 (diff) |
Fixed CPU gradInputs float error
-rw-r--r-- | CTCCriterion.lua | 1 |
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) |