mv3 small support det

This commit is contained in:
WenmuZhou 2021-01-26 13:01:45 +08:00
parent 0275354c93
commit ed400c8645
1 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,7 @@ class MobileNetV3():
"""
self.scale = params['scale']
model_name = params['model_name']
self.model_name = model_name
self.inplanes = 16
if model_name == "large":
self.cfg = [
@ -102,7 +103,8 @@ class MobileNetV3():
inplanes = self.make_divisible(inplanes * scale)
outs = []
for layer_cfg in cfg:
if layer_cfg[5] == 2 and i > 2:
start_idx = 2 if self.model_name == 'large' else 0
if layer_cfg[5] == 2 and i > start_idx:
outs.append(conv)
conv = self.residual_unit(
input=conv,