Atk Hairy Hairy File

results=[] for path, x in images: x = x.to(device) # get label logits = model((x - torch.tensor([0.485,0.456,0.406],device=device).view(1,3,1,1)) / torch.tensor([0.229,0.224,0.225],device=device).view(1,3,1,1)) orig_label = logits.argmax(dim=1).cpu().item()

images = load_images("./images/", maxn=50) atk hairy hairy

# Helper: load images def load_images(folder, maxn=50): paths = [os.path.join(folder,f) for f in os.listdir(folder) if f.lower().endswith(('.jpg','.png'))] imgs=[] for p in paths[:maxn]: img = Image.open(p).convert('RGB') imgs.append((p, preprocess(img).unsqueeze(0))) return imgs results=[] for path, x in images: x = x