diff --git a/ppdet/modeling/backbones/resnet.py b/ppdet/modeling/backbones/resnet.py index bdc714e07f187c05dd27dbb04a5b5c1168ab7002..6be2fc6e16cfa94695aad596ffa2ecfd0705f7b8 100755 --- a/ppdet/modeling/backbones/resnet.py +++ b/ppdet/modeling/backbones/resnet.py @@ -590,8 +590,9 @@ class Res5Head(nn.Layer): 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