From d02bcd932c2f76bc1dd52e7c7c593743a7f0e8b7 Mon Sep 17 00:00:00 2001 From: shangliang Xu Date: Tue, 30 Aug 2022 13:46:51 +0800 Subject: [PATCH] [cherry-pick] fix ppyoloe amp bug, add reduce_mean to custom_black_list (#6797) --- configs/ppyoloe/README.md | 4 ++-- configs/ppyoloe/README_cn.md | 3 ++- configs/ppyoloe/_base_/ppyoloe_crn.yml | 1 + configs/ppyoloe/_base_/ppyoloe_plus_crn.yml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/ppyoloe/README.md b/configs/ppyoloe/README.md index 5e5bcd396..5b29a91b9 100644 --- a/configs/ppyoloe/README.md +++ b/configs/ppyoloe/README.md @@ -78,12 +78,12 @@ The PaddleDetection team provides configs and weights of various feature detecti Training PP-YOLOE+ on 8 GPUs with following command ```bash -python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml +python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml --eval --amp ``` **Notes:** -- use `--amp` to train with default config to avoid out of memeory. - If you need to evaluate while training, please add `--eval`. +- PP-YOLOE+ supports mixed precision training, please add `--amp`. - PaddleDetection supports multi-machine distribued training, you can refer to [DistributedTraining tutorial](../../docs/DistributedTraining_en.md). diff --git a/configs/ppyoloe/README_cn.md b/configs/ppyoloe/README_cn.md index 0ca5bbd21..e9acb7980 100644 --- a/configs/ppyoloe/README_cn.md +++ b/configs/ppyoloe/README_cn.md @@ -78,10 +78,11 @@ PaddleDetection团队提供了基于PP-YOLOE的各种垂类检测模型的配置 请执行以下指令训练PP-YOLOE+ ```bash -python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml +python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml --eval --amp ``` **注意:** - 如果需要边训练边评估,请添加`--eval`. +- PP-YOLOE+支持混合精度训练,请添加`--amp`. - PaddleDetection支持多机训练,可以参考[多机训练教程](../../docs/DistributedTraining_cn.md). ### 评估 diff --git a/configs/ppyoloe/_base_/ppyoloe_crn.yml b/configs/ppyoloe/_base_/ppyoloe_crn.yml index 7abee87a2..e1c3cc857 100644 --- a/configs/ppyoloe/_base_/ppyoloe_crn.yml +++ b/configs/ppyoloe/_base_/ppyoloe_crn.yml @@ -2,6 +2,7 @@ architecture: YOLOv3 norm_type: sync_bn use_ema: true ema_decay: 0.9998 +custom_black_list: ['reduce_mean'] YOLOv3: backbone: CSPResNet diff --git a/configs/ppyoloe/_base_/ppyoloe_plus_crn.yml b/configs/ppyoloe/_base_/ppyoloe_plus_crn.yml index 664bbfa1a..ba8ef992c 100644 --- a/configs/ppyoloe/_base_/ppyoloe_plus_crn.yml +++ b/configs/ppyoloe/_base_/ppyoloe_plus_crn.yml @@ -2,6 +2,7 @@ architecture: YOLOv3 norm_type: sync_bn use_ema: true ema_decay: 0.9998 +custom_black_list: ['reduce_mean'] YOLOv3: backbone: CSPResNet -- GitLab