From 207969039b3954f6426f8c9fc8138350aacbd06d Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Fri, 19 Aug 2022 08:29:19 +0000 Subject: [PATCH] support config black_list in yml --- tools/program.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/program.py b/tools/program.py index 012a2c61..50f8455e 100755 --- a/tools/program.py +++ b/tools/program.py @@ -277,7 +277,8 @@ def train(config, model_average = True # use amp if scaler: - with paddle.amp.auto_cast(level=amp_level): + custom_black_list = config['Global'].get('amp_custom_black_list',[]) + with paddle.amp.auto_cast(level=amp_level, custom_black_list=custom_black_list): if model_type == 'table' or extra_input: preds = model(images, data=batch[1:]) elif model_type in ["kie", 'vqa']: -- GitLab