add SLANet

This commit is contained in:
WenmuZhou
2022-08-08 06:50:27 +00:00
parent 342522ab52
commit ddaa2c2552
35 changed files with 2781 additions and 357 deletions
+3 -1
View File
@@ -154,6 +154,7 @@ def check_xpu(use_xpu):
except Exception as e:
pass
def to_float32(preds):
if isinstance(preds, dict):
for k in preds:
@@ -173,6 +174,7 @@ def to_float32(preds):
preds = preds.astype(paddle.float32)
return preds
def train(config,
train_dataloader,
valid_dataloader,
@@ -596,7 +598,7 @@ def preprocess(is_train=False):
'EAST', 'DB', 'SAST', 'Rosetta', 'CRNN', 'STARNet', 'RARE', 'SRN',
'CLS', 'PGNet', 'Distillation', 'NRTR', 'TableAttn', 'SAR', 'PSE',
'SEED', 'SDMGR', 'LayoutXLM', 'LayoutLM', 'LayoutLMv2', 'PREN', 'FCE',
'SVTR', 'ViTSTR', 'ABINet', 'DB++', 'TableMaster', 'SPIN'
'SVTR', 'ViTSTR', 'ABINet', 'DB++', 'TableMaster', 'SPIN', 'SLANet'
]
if use_xpu: