From 7f59fb000f9cdf0b39cfee008dc81723781e08de Mon Sep 17 00:00:00 2001 From: rhcsky Date: Fri, 24 Jul 2020 10:25:30 +0900 Subject: [PATCH] Correct demo.py error when running with CTC --- demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.py b/demo.py index 45f3d04..5dd960e 100755 --- a/demo.py +++ b/demo.py @@ -57,7 +57,7 @@ def demo(opt): # Select max probabilty (greedy decoding) then decode index to character preds_size = torch.IntTensor([preds.size(1)] * batch_size) _, preds_index = preds.max(2) - preds_index = preds_index.view(-1) + # preds_index = preds_index.view(-1) preds_str = converter.decode(preds_index.data, preds_size.data) else: