mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-01-03 10:37:18 +00:00
Merge pull request #7266 from WenmuZhou/tipc
add PP-OCRv2 det amp custom_black_list
This commit is contained in:
commit
94710ae319
@ -14,6 +14,9 @@ Global:
|
||||
use_visualdl: False
|
||||
infer_img: doc/imgs_en/img_10.jpg
|
||||
save_res_path: ./output/det_db/predicts_db.txt
|
||||
use_amp: False
|
||||
amp_level: O2
|
||||
amp_custom_black_list: ['exp']
|
||||
|
||||
Architecture:
|
||||
name: DistillationModel
|
||||
|
||||
@ -278,7 +278,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']:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user