From bd5d850981add643c276dd372ec8256d855fa73a Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Thu, 15 Apr 2021 11:14:45 +0800 Subject: [PATCH] fix res5 (#2631) --- ppdet/modeling/backbones/resnet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/modeling/backbones/resnet.py b/ppdet/modeling/backbones/resnet.py index bdc714e07f187..6be2fc6e16cfa 100755 --- a/ppdet/modeling/backbones/resnet.py +++ b/ppdet/modeling/backbones/resnet.py @@ -590,8 +590,9 @@ def __init__(self, depth=50): if depth < 50: feat_in = 256 na = NameAdapter(self) + block = BottleNeck if depth >= 50 else BasicBlock self.res5 = Blocks( - depth, feat_in, feat_out, count=3, name_adapter=na, stage_num=5) + block, feat_in, feat_out, count=3, name_adapter=na, stage_num=5) self.feat_out = feat_out if depth < 50 else feat_out * 4 @property