소스 검색

Update mineru/model/utils/pytorchocr/modeling/heads/rec_ppformulanet_head.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao 4 주 전
부모
커밋
c8ccf4cf20
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      mineru/model/utils/pytorchocr/modeling/heads/rec_ppformulanet_head.py

+ 1 - 1
mineru/model/utils/pytorchocr/modeling/heads/rec_ppformulanet_head.py

@@ -219,7 +219,7 @@ class AttentionMaskConverter:
 
         if causal_4d_mask is not None:
             expanded_attn_mask = causal_4d_mask.masked_fill_(
-                expanded_attn_mask.cast(torch.bool), torch.finfo(dtype).min
+                expanded_attn_mask.to(torch.bool), torch.finfo(dtype).min
             )
 
         expanded_4d_mask = expanded_attn_mask