[英]Loading resnet50 prettrianed model in PyTorch
根據最新定義,我們現在使用 torchvision 庫加載模型,您可以嘗試使用:
from torchvision.models import resnet50, ResNet50_Weights
# Old weights with accuracy 76.130%
model1 = resnet50(weights=ResNet50_Weights.IMAGENET1K_V1)
# New weights with accuracy 80.858%
model2 = resnet50(weights=ResNet50_Weights.IMAGENET1K_V2)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.