|
|
|
@ -845,8 +845,7 @@ def spnasnet_100(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b0(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B0 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b0', channel_multiplier=1.0, depth_multiplier=1.0, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -855,8 +854,7 @@ def efficientnet_b0(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b1(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B1 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b1', channel_multiplier=1.0, depth_multiplier=1.1, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -865,8 +863,7 @@ def efficientnet_b1(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b2(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B2 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.3
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.3, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b2', channel_multiplier=1.1, depth_multiplier=1.2, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -875,8 +872,7 @@ def efficientnet_b2(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b3(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B3 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.3
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.3, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b3', channel_multiplier=1.2, depth_multiplier=1.4, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -885,8 +881,7 @@ def efficientnet_b3(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b4(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B4 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.4
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.4, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b4', channel_multiplier=1.4, depth_multiplier=1.8, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -895,8 +890,7 @@ def efficientnet_b4(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b5(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B5 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.4
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.4, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b5', channel_multiplier=1.6, depth_multiplier=2.2, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -905,8 +899,7 @@ def efficientnet_b5(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b6(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B6 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.5
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.5, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b6', channel_multiplier=1.8, depth_multiplier=2.6, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -915,8 +908,7 @@ def efficientnet_b6(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_b7(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B7 """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.5
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.5, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet(
|
|
|
|
|
'efficientnet_b7', channel_multiplier=2.0, depth_multiplier=3.1, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -949,8 +941,7 @@ def efficientnet_el(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_cc_b0_4e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B0 w/ 8 Experts """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
|
'efficientnet_cc_b0_4e', channel_multiplier=1.0, depth_multiplier=1.0, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
@ -959,8 +950,7 @@ def efficientnet_cc_b0_4e(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_cc_b0_8e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B0 w/ 8 Experts """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
|
'efficientnet_cc_b0_8e', channel_multiplier=1.0, depth_multiplier=1.0, experts_multiplier=2,
|
|
|
|
|
pretrained=pretrained, **kwargs)
|
|
|
|
@ -969,8 +959,7 @@ def efficientnet_cc_b0_8e(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def efficientnet_cc_b1_8e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B1 w/ 8 Experts """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
|
'efficientnet_cc_b1_8e', channel_multiplier=1.0, depth_multiplier=1.1, experts_multiplier=2,
|
|
|
|
|
pretrained=pretrained, **kwargs)
|
|
|
|
@ -1008,7 +997,7 @@ def tf_efficientnet_b2(pretrained=False, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@register_model
|
|
|
|
|
def tf_efficientnet_b3(pretrained=False, num_classes=1000, in_chans=3, **kwargs):
|
|
|
|
|
def tf_efficientnet_b3(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B3. Tensorflow compatible variant """
|
|
|
|
|
kwargs['bn_eps'] = BN_EPS_TF_DEFAULT
|
|
|
|
|
kwargs['pad_type'] = 'same'
|
|
|
|
@ -1090,7 +1079,7 @@ def tf_efficientnet_b2_ap(pretrained=False, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@register_model
|
|
|
|
|
def tf_efficientnet_b3_ap(pretrained=False, num_classes=1000, in_chans=3, **kwargs):
|
|
|
|
|
def tf_efficientnet_b3_ap(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-B3. Tensorflow compatible variant """
|
|
|
|
|
kwargs['bn_eps'] = BN_EPS_TF_DEFAULT
|
|
|
|
|
kwargs['pad_type'] = 'same'
|
|
|
|
@ -1186,8 +1175,7 @@ def tf_efficientnet_el(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def tf_efficientnet_cc_b0_4e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B0 w/ 4 Experts. Tensorflow compatible variant """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
kwargs['bn_eps'] = BN_EPS_TF_DEFAULT
|
|
|
|
|
kwargs['pad_type'] = 'same'
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
@ -1198,8 +1186,7 @@ def tf_efficientnet_cc_b0_4e(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def tf_efficientnet_cc_b0_8e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B0 w/ 8 Experts. Tensorflow compatible variant """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
kwargs['bn_eps'] = BN_EPS_TF_DEFAULT
|
|
|
|
|
kwargs['pad_type'] = 'same'
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
@ -1210,8 +1197,7 @@ def tf_efficientnet_cc_b0_8e(pretrained=False, **kwargs):
|
|
|
|
|
@register_model
|
|
|
|
|
def tf_efficientnet_cc_b1_8e(pretrained=False, **kwargs):
|
|
|
|
|
""" EfficientNet-CondConv-B1 w/ 8 Experts. Tensorflow compatible variant """
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2
|
|
|
|
|
#kwargs['drop_connect_rate'] = 0.2 # set when training, TODO add as cmd arg
|
|
|
|
|
# NOTE for train, drop_rate should be 0.2, drop_connect_rate should be 0.2
|
|
|
|
|
kwargs['bn_eps'] = BN_EPS_TF_DEFAULT
|
|
|
|
|
kwargs['pad_type'] = 'same'
|
|
|
|
|
model = _gen_efficientnet_condconv(
|
|
|
|
@ -1262,7 +1248,6 @@ def mixnet_xxl(pretrained=False, **kwargs):
|
|
|
|
|
"""Creates a MixNet Double Extra Large model.
|
|
|
|
|
Not a paper spec, experimental def by RW w/ depth scaling.
|
|
|
|
|
"""
|
|
|
|
|
# kwargs['drop_connect_rate'] = 0.2
|
|
|
|
|
model = _gen_mixnet_m(
|
|
|
|
|
'mixnet_xxl', channel_multiplier=2.4, depth_multiplier=1.3, pretrained=pretrained, **kwargs)
|
|
|
|
|
return model
|
|
|
|
|