From b9e0a998320ccaf3114b539a86c1b8336592f90d Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Tue, 26 Jan 2021 12:58:38 +0800 Subject: [PATCH] mv3 small support det --- ppocr/modeling/backbones/det_mobilenet_v3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppocr/modeling/backbones/det_mobilenet_v3.py b/ppocr/modeling/backbones/det_mobilenet_v3.py index f97bcfca..ca3dc0e1 100755 --- a/ppocr/modeling/backbones/det_mobilenet_v3.py +++ b/ppocr/modeling/backbones/det_mobilenet_v3.py @@ -112,7 +112,8 @@ class MobileNetV3(nn.Layer): inplanes = make_divisible(inplanes * scale) for (k, exp, c, se, nl, s) in cfg: se = se and not self.disable_se - if s == 2 and i > 2: + start_idx = 2 if model_name == 'large' else 0 + if s == 2 and i > start_idx: self.out_channels.append(inplanes) self.stages.append(nn.Sequential(*block_list)) block_list = [] -- GitLab