From b6c5b6f6099b65b6a4db8448e4df52c152a2b059 Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Mon, 1 Jul 2019 20:50:44 +0800 Subject: [PATCH] Add depth for ResNetC5 in some configs (#2655) --- configs/faster_rcnn_r101_1x.yml | 1 + configs/faster_rcnn_r50_1x.yml | 1 + configs/faster_rcnn_r50_2x.yml | 1 + configs/faster_rcnn_r50_vd_1x.yml | 1 + configs/mask_rcnn_r50_1x.yml | 1 + configs/mask_rcnn_r50_2x.yml | 1 + ppdet/utils/checkpoint.py | 3 ++- 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/faster_rcnn_r101_1x.yml b/configs/faster_rcnn_r101_1x.yml index d94047756..b04a9fc42 100644 --- a/configs/faster_rcnn_r101_1x.yml +++ b/configs/faster_rcnn_r101_1x.yml @@ -25,6 +25,7 @@ ResNet: freeze_at: 2 ResNetC5: + depth: 101 norm_type: affine_channel RPNHead: diff --git a/configs/faster_rcnn_r50_1x.yml b/configs/faster_rcnn_r50_1x.yml index 10002a176..9ec90c674 100644 --- a/configs/faster_rcnn_r50_1x.yml +++ b/configs/faster_rcnn_r50_1x.yml @@ -25,6 +25,7 @@ ResNet: freeze_at: 2 ResNetC5: + depth: 50 norm_type: affine_channel RPNHead: diff --git a/configs/faster_rcnn_r50_2x.yml b/configs/faster_rcnn_r50_2x.yml index 0e9686b1a..c28bcc25f 100644 --- a/configs/faster_rcnn_r50_2x.yml +++ b/configs/faster_rcnn_r50_2x.yml @@ -25,6 +25,7 @@ ResNet: freeze_at: 2 ResNetC5: + depth: 50 norm_type: affine_channel RPNHead: diff --git a/configs/faster_rcnn_r50_vd_1x.yml b/configs/faster_rcnn_r50_vd_1x.yml index 528760d94..5941a0377 100644 --- a/configs/faster_rcnn_r50_vd_1x.yml +++ b/configs/faster_rcnn_r50_vd_1x.yml @@ -26,6 +26,7 @@ ResNet: variant: d ResNetC5: + depth: 50 norm_type: affine_channel variant: d diff --git a/configs/mask_rcnn_r50_1x.yml b/configs/mask_rcnn_r50_1x.yml index 9938d289b..571be5fef 100644 --- a/configs/mask_rcnn_r50_1x.yml +++ b/configs/mask_rcnn_r50_1x.yml @@ -28,6 +28,7 @@ ResNet: freeze_at: 2 ResNetC5: + depth: 50 norm_type: affine_channel RPNHead: diff --git a/configs/mask_rcnn_r50_2x.yml b/configs/mask_rcnn_r50_2x.yml index 97009098d..2c3b59b22 100644 --- a/configs/mask_rcnn_r50_2x.yml +++ b/configs/mask_rcnn_r50_2x.yml @@ -29,6 +29,7 @@ ResNet: freeze_at: 2 ResNetC5: + depth: 50 norm_type: affine_channel RPNHead: diff --git a/ppdet/utils/checkpoint.py b/ppdet/utils/checkpoint.py index 4a20ef725..b5bbc792c 100644 --- a/ppdet/utils/checkpoint.py +++ b/ppdet/utils/checkpoint.py @@ -183,7 +183,8 @@ def load_and_fusebn(exe, prog, path): [scale_name, bias_name, mean_name, variance_name]) if not bn_in_path: - raise ValueError("The model in path {} has not params of batch norm.") + raise ValueError("There is no params of batch norm in model {}.".format( + path)) # load running mean and running variance on cpu place into global scope. place = fluid.CPUPlace() -- GitLab