Modify unnecessary syntax

This commit is contained in:
rhcsky 2020-07-24 10:26:01 +09:00
parent 7f59fb000f
commit 485344a7ef
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ def demo(opt):
preds_size = torch.IntTensor([preds.size(1)] * batch_size) preds_size = torch.IntTensor([preds.size(1)] * batch_size)
_, preds_index = preds.max(2) _, 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) preds_str = converter.decode(preds_index, preds_size)
else: else:
preds = model(image, text_for_pred, is_train=False) preds = model(image, text_for_pred, is_train=False)