Remove 'image_features'

This commit is contained in:
Yonghye Kwon 2023-06-13 17:14:57 +09:00 committed by GitHub
parent dc414b8000
commit 10f92d3dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -36,8 +36,6 @@ image = preprocess(Image.open("CLIP.png")).unsqueeze(0).to(device)
text = clip.tokenize(["a diagram", "a dog", "a cat"]).to(device)
with torch.no_grad():
image_features = model.encode_image(image)
logits_per_image, logits_per_text = model(image, text)
probs = logits_per_image.softmax(dim=-1).cpu().numpy()