From 92c9eaf3147a85c81cd5b45cc736538cdf9aeba4 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Fri, 29 Oct 2021 08:28:59 +0000 Subject: [PATCH] fix sar train on cpu --- ppocr/modeling/heads/rec_sar_head.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ppocr/modeling/heads/rec_sar_head.py b/ppocr/modeling/heads/rec_sar_head.py index 7107788d..2f15801b 100644 --- a/ppocr/modeling/heads/rec_sar_head.py +++ b/ppocr/modeling/heads/rec_sar_head.py @@ -275,7 +275,6 @@ class ParallelSARDecoder(BaseDecoder): if img_metas is not None and self.mask: valid_ratios = img_metas[-1] - label = label.cuda() lab_embedding = self.embedding(label) # bsz * seq_len * emb_dim out_enc = out_enc.unsqueeze(1) -- GitLab