Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nhwc for maskrcnn #8640

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

AndSonder
Copy link

@AndSonder AndSonder commented Sep 19, 2023

为 MaskRCNN 添加 nhwc 数据类型输入的支持

运行命令:

# amp + nhwc
FLAGS_cudnn_batchnorm_spatial_persistent=1 python tools/train.py -c configs/mask_rcnn/mask_rcnn_r50_1x_coco_nhwc.yml -o LearningRate.base_lr=0.0001 log_iter=1 use_gpu=True save_dir=./test_tipc/output/mask_rcnn_r50_1x_coco/benchmark_train/norm_train_gpus_0_autocast_fp32 epoch=1  TrainReader.batch_size=2 amp=True filename=mask_rcnn_r50_1x_coco TrainReader.shuffle=False   --enable_ce=True

# baseline
python tools/train.py -c configs/mask_rcnn/mask_rcnn_r50_1x_coco.yml -o LearningRate.base_lr=0.0001 log_iter=1 use_gpu=True save_dir=./test_tipc/output/mask_rcnn_r50_1x_coco/benchmark_train/norm_train_gpus_0_autocast_fp32 epoch=1 TrainReader.batch_size=2 filename=mask_rcnn_r50_1x_coco TrainReader.shuffle=False   --enable_ce=True

相同配置下对比训练精度可得,使用 amp + nhwc 和 Baseline 版本的模型基本不存在精度误差:

image

相关Issue:

@paddle-bot
Copy link

paddle-bot bot commented Sep 19, 2023

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants