From a1cb123cfa0d5e8dfdfdc581a1d98fadb381445e Mon Sep 17 00:00:00 2001 From: liaoxingyu Date: Tue, 26 May 2020 14:48:32 +0800 Subject: [PATCH] fix R101 bottleneck missing problem Summary: add key 101 in block dict to support R101 --- fastreid/modeling/backbones/resnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastreid/modeling/backbones/resnet.py b/fastreid/modeling/backbones/resnet.py index 2f5cd4b..61b8de1 100644 --- a/fastreid/modeling/backbones/resnet.py +++ b/fastreid/modeling/backbones/resnet.py @@ -250,7 +250,7 @@ def build_resnet_backbone(cfg): num_blocks_per_stage = {34: [3, 4, 6, 3], 50: [3, 4, 6, 3], 101: [3, 4, 23, 3], 152: [3, 8, 36, 3], }[depth] nl_layers_per_stage = {34: [3, 4, 6, 3], 50: [0, 2, 3, 0], 101: [0, 2, 9, 0]}[depth] - block = {34: BasicBlock, 50: Bottleneck}[depth] + block = {34: BasicBlock, 50: Bottleneck, 101: Bottleneck}[depth] model = ResNet(last_stride, bn_norm, num_splits, with_ibn, with_se, with_nl, block, num_blocks_per_stage, nl_layers_per_stage) if pretrain: