From 7bb4cd00fa29f1d302b02a9780071c6bf34bef4c Mon Sep 17 00:00:00 2001 From: pthgjmk <30973716+pthgjmk@users.noreply.github.com> Date: Wed, 16 Dec 2020 07:09:25 +0800 Subject: [PATCH] Update ctc.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第91行与书中公式不同 --- chapter-6/ctc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter-6/ctc.py b/chapter-6/ctc.py index 8683ff3..261e0ce 100644 --- a/chapter-6/ctc.py +++ b/chapter-6/ctc.py @@ -103,7 +103,7 @@ def ctc_loss(params, seq, blank=0, is_prob=True): return -llForward, grad, True -grad = params - grad / (params * absum) +grad = params - grad / (params*params * absum) return -llForward, grad, False