From 73abbbb869d55c79b35d9952e3347518bde9c504 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Fri, 22 Sep 2023 15:59:39 +0800 Subject: [PATCH] fix `cls_x` and `bbox_x` is possibly unbound --- ppocr/modeling/heads/table_master_head.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ppocr/modeling/heads/table_master_head.py b/ppocr/modeling/heads/table_master_head.py index 486f9cbea1..7d37e36960 100644 --- a/ppocr/modeling/heads/table_master_head.py +++ b/ppocr/modeling/heads/table_master_head.py @@ -90,11 +90,13 @@ def decode(self, input, feature, src_mask, tgt_mask): x = layer(x, feature, src_mask, tgt_mask) # cls head + cls_x = x for layer in self.cls_layer: cls_x = layer(x, feature, src_mask, tgt_mask) cls_x = self.norm(cls_x) # bbox head + bbox_x = x for layer in self.bbox_layer: bbox_x = layer(x, feature, src_mask, tgt_mask) bbox_x = self.norm(bbox_x)