From 888abd05b11dfdee8fb27e575eb0b12dc3f9e464 Mon Sep 17 00:00:00 2001 From: liwenyun Date: Mon, 28 Oct 2024 19:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20svhn=5Fat.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svhn_at.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/svhn_at.py b/svhn_at.py index e523658..2fd1907 100644 --- a/svhn_at.py +++ b/svhn_at.py @@ -29,16 +29,6 @@ IMAGENET_DEFAULT_STD = processor.image_std size = processor.size["height"] -model = timm.create_model("timm/vit_base_patch16_224.orig_in21k_ft_in1k", -pretrained=False) -model.head = nn.Linear(model.head.in_features, 10) -model.load_state_dict( - torch.hub.load_state_dict_from_url( - "https://huggingface.co/edadaltocg/vit_base_patch16_224_in21k_ft_svhn/resolve/main/pytorch_model.bin", - map_location="cpu", - file_name="vit_base_patch16_224_in21k_ft_svhn.pth", - ) -) model = timm.create_model("timm/vit_base_patch16_224.orig_in21k_ft_in1k", pretrained=False)