Remove unused variable 'text_features'

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

View File

@ -37,7 +37,6 @@ text = clip.tokenize(["a diagram", "a dog", "a cat"]).to(device)
with torch.no_grad():
image_features = model.encode_image(image)
text_features = model.encode_text(text)
logits_per_image, logits_per_text = model(image, text)
probs = logits_per_image.softmax(dim=-1).cpu().numpy()