提交 6da86dd4 编写于 作者: L lyuwenyu

add resnext series

上级 88600d33
...@@ -484,8 +484,6 @@ def MobileNetV2_x2_0(**kwargs): ...@@ -484,8 +484,6 @@ def MobileNetV2_x2_0(**kwargs):
return model return model
def MobileNetV3_large_x0_35(**kwargs): def MobileNetV3_large_x0_35(**kwargs):
'''MobileNetV3_large_x0_35 '''MobileNetV3_large_x0_35
''' '''
...@@ -514,7 +512,6 @@ def MobileNetV3_large_x0_5(**kwargs): ...@@ -514,7 +512,6 @@ def MobileNetV3_large_x0_5(**kwargs):
return model return model
def MobileNetV3_large_x0_75(**kwargs): def MobileNetV3_large_x0_75(**kwargs):
'''MobileNetV3_large_x0_75 '''MobileNetV3_large_x0_75
''' '''
...@@ -543,7 +540,6 @@ def MobileNetV3_large_x1_0(**kwargs): ...@@ -543,7 +540,6 @@ def MobileNetV3_large_x1_0(**kwargs):
return model return model
def MobileNetV3_large_x1_25(**kwargs): def MobileNetV3_large_x1_25(**kwargs):
'''MobileNetV3_large_x1_25 '''MobileNetV3_large_x1_25
''' '''
...@@ -558,7 +554,6 @@ def MobileNetV3_large_x1_25(**kwargs): ...@@ -558,7 +554,6 @@ def MobileNetV3_large_x1_25(**kwargs):
return model return model
def MobileNetV3_small_x0_35(**kwargs): def MobileNetV3_small_x0_35(**kwargs):
'''MobileNetV3_small_x0_35 '''MobileNetV3_small_x0_35
''' '''
...@@ -573,7 +568,6 @@ def MobileNetV3_small_x0_35(**kwargs): ...@@ -573,7 +568,6 @@ def MobileNetV3_small_x0_35(**kwargs):
return model return model
def MobileNetV3_small_x0_5(**kwargs): def MobileNetV3_small_x0_5(**kwargs):
'''MobileNetV3_small_x0_5 '''MobileNetV3_small_x0_5
''' '''
...@@ -588,7 +582,6 @@ def MobileNetV3_small_x0_5(**kwargs): ...@@ -588,7 +582,6 @@ def MobileNetV3_small_x0_5(**kwargs):
return model return model
def MobileNetV3_small_x0_75(**kwargs): def MobileNetV3_small_x0_75(**kwargs):
'''MobileNetV3_small_x0_75 '''MobileNetV3_small_x0_75
''' '''
...@@ -603,7 +596,6 @@ def MobileNetV3_small_x0_75(**kwargs): ...@@ -603,7 +596,6 @@ def MobileNetV3_small_x0_75(**kwargs):
return model return model
def MobileNetV3_small_x1_0(**kwargs): def MobileNetV3_small_x1_0(**kwargs):
'''MobileNetV3_small_x1_0 '''MobileNetV3_small_x1_0
''' '''
...@@ -618,7 +610,6 @@ def MobileNetV3_small_x1_0(**kwargs): ...@@ -618,7 +610,6 @@ def MobileNetV3_small_x1_0(**kwargs):
return model return model
def MobileNetV3_small_x1_25(**kwargs): def MobileNetV3_small_x1_25(**kwargs):
'''MobileNetV3_small_x1_25 '''MobileNetV3_small_x1_25
''' '''
...@@ -633,3 +624,86 @@ def MobileNetV3_small_x1_25(**kwargs): ...@@ -633,3 +624,86 @@ def MobileNetV3_small_x1_25(**kwargs):
return model return model
def ResNeXt101_32x4d(**kwargs):
'''ResNeXt101_32x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt101_32x4d(**kwargs)
if pretrained:
assert 'ResNeXt101_32x4d' in _checkpoints, 'Not provide `ResNeXt101_32x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt101_32x4d'])
model.set_state_dict(paddle.load(path))
return model
def ResNeXt101_64x4d(**kwargs):
'''ResNeXt101_64x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt101_64x4d(**kwargs)
if pretrained:
assert 'ResNeXt101_64x4d' in _checkpoints, 'Not provide `ResNeXt101_64x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt101_64x4d'])
model.set_state_dict(paddle.load(path))
return model
def ResNeXt152_32x4d(**kwargs):
'''ResNeXt152_32x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt152_32x4d(**kwargs)
if pretrained:
assert 'ResNeXt152_32x4d' in _checkpoints, 'Not provide `ResNeXt152_32x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt152_32x4d'])
model.set_state_dict(paddle.load(path))
return model
def ResNeXt152_64x4d(**kwargs):
'''ResNeXt152_64x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt152_64x4d(**kwargs)
if pretrained:
assert 'ResNeXt152_64x4d' in _checkpoints, 'Not provide `ResNeXt152_64x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt152_64x4d'])
model.set_state_dict(paddle.load(path))
return model
def ResNeXt50_32x4d(**kwargs):
'''ResNeXt50_32x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt50_32x4d(**kwargs)
if pretrained:
assert 'ResNeXt50_32x4d' in _checkpoints, 'Not provide `ResNeXt50_32x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt50_32x4d'])
model.set_state_dict(paddle.load(path))
return model
def ResNeXt50_64x4d(**kwargs):
'''ResNeXt50_64x4d
'''
pretrained = kwargs.pop('pretrained', False)
model = _resnext.ResNeXt50_64x4d(**kwargs)
if pretrained:
assert 'ResNeXt50_64x4d' in _checkpoints, 'Not provide `ResNeXt50_64x4d` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['ResNeXt50_64x4d'])
model.set_state_dict(paddle.load(path))
return model
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册