Spaces:
Runtime error
Runtime error
Samuel Schmidt
commited on
Commit
·
b56a778
1
Parent(s):
b836cf0
Fix: return feature vectors for all images in the batch
Browse files- src/CLIP.py +2 -2
src/CLIP.py
CHANGED
@@ -24,5 +24,5 @@ class CLIPImageEncoder:
|
|
24 |
#image_features = self.model(**input).last_hidden_state[:,0].cpu()
|
25 |
print(image_features)
|
26 |
print("--------------------")
|
27 |
-
print(self.model.get_image_features(**input).cpu().detach().numpy()
|
28 |
-
return {"clip_embeddings": image_features.cpu().detach().numpy()
|
|
|
24 |
#image_features = self.model(**input).last_hidden_state[:,0].cpu()
|
25 |
print(image_features)
|
26 |
print("--------------------")
|
27 |
+
print(self.model.get_image_features(**input).cpu().detach().numpy())
|
28 |
+
return {"clip_embeddings": image_features.cpu().detach().numpy()}
|