提交 4b93aaae 编写于 作者: B breezedeus

fix: will cause inf when using too short images

上级 2f675ed3
......@@ -258,6 +258,7 @@ class OcrModel(nn.Module):
seq_length,
torch.tensor(seq_len, dtype=torch.int, device=probs.device),
len(self.vocab),
zero_infinity=True,
)
return ctc_loss
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册