diff options
-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) |