本文整理匯總了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)