本文整理汇总了Python中efficientnet_pytorch.EfficientNet.from_pretrained方法的典型用法代码示例。如果您正苦于以下问题:Python EfficientNet.from_pretrained方法的具体用法?Python EfficientNet.from_pretrained怎么用?Python EfficientNet.from_pretrained使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efficientnet_pytorch.EfficientNet
的用法示例。
在下文中一共展示了EfficientNet.from_pretrained方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: efficientnet_b0
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b0(config):
return EfficientNet.from_pretrained('efficientnet-b0',num_classes=config['numClasses'])
示例2: efficientnet_b1
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b1(config):
return EfficientNet.from_pretrained('efficientnet-b1',num_classes=config['numClasses'])
示例3: efficientnet_b2
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b2(config):
return EfficientNet.from_pretrained('efficientnet-b2',num_classes=config['numClasses'])
示例4: efficientnet_b3
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b3(config):
return EfficientNet.from_pretrained('efficientnet-b3',num_classes=config['numClasses'])
示例5: efficientnet_b4
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b4(config):
return EfficientNet.from_pretrained('efficientnet-b4',num_classes=config['numClasses'])
示例6: efficientnet_b6
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b6(config):
return EfficientNet.from_pretrained('efficientnet-b6',num_classes=config['numClasses'])
示例7: efficientnet_b7
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b7(config):
return EfficientNet.from_pretrained('efficientnet-b7',num_classes=config['numClasses'])
示例8: __init__
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def __init__(self, ):
super(EfficientNet, self).__init__()
model = EffNet.from_pretrained('efficientnet-b0')
del model._conv_head
del model._bn1
del model._avg_pooling
del model._dropout
del model._fc
self.model = model
示例9: efficientnet_b0
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b0(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b0', num_classes=num_classes)
示例10: efficientnet_b1
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b1(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b1', num_classes=num_classes)
示例11: efficientnet_b2
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b2(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b2', num_classes=num_classes)
示例12: efficientnet_b3
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b3(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b3', num_classes=num_classes)
示例13: efficientnet_b4
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b4(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b4', num_classes=num_classes)
示例14: efficientnet_b6
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b6(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b6', num_classes=num_classes)
示例15: efficientnet_b7
# 需要导入模块: from efficientnet_pytorch import EfficientNet [as 别名]
# 或者: from efficientnet_pytorch.EfficientNet import from_pretrained [as 别名]
def efficientnet_b7(num_classes=1000, **kwargs):
return EfficientNet.from_pretrained('efficientnet-b7', num_classes=num_classes)