未验证 提交 26a58266 编写于 作者: L lywen 提交者: GitHub

fix image w<8 error

上级 c82915d6
......@@ -129,6 +129,8 @@ class CRNN(nn.Module):
image = image.view(1,1, *image.size())
image = Variable(image)
if image.size()[-1]<8:
return ''
preds = self(image)
_, preds = preds.max(2)
preds = preds.transpose(1, 0).contiguous().view(-1)
......@@ -197,4 +199,4 @@ class CRNN(nn.Module):
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册