Correct demo.py error when running with CTC
This commit is contained in:
parent
425a9b3e1f
commit
7f59fb000f
2
demo.py
2
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:
|
||||
|
|
Loading…
Reference in New Issue