ソースを参照

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
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