Skip to content

Commit

Permalink
[mieb] Fix Moco model on CIFAR10Clustering (#1487)
Browse files Browse the repository at this point in the history
Fix Moco model on CIFAR10Clustering
  • Loading branch information
isaac-chung authored Nov 22, 2024
1 parent 2fc19e7 commit fab0b82
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
5 changes: 4 additions & 1 deletion mteb/models/moco_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ def get_image_embeddings(
with torch.no_grad():
for i in tqdm(range(0, len(images), batch_size)):
batch_images = images[i : i + batch_size]
inputs = torch.vstack(
[self.processor(b).unsqueeze(0) for b in batch_images]
)
output = self.model(
self.processor(batch_images)
inputs
) # output is (batch_size, num_features) shaped tensor
all_image_embeddings.append(output)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"dataset_revision": "0b2714987fa478483af9968de7c934580d0bb9a2",
"evaluation_time": 265.58390378952026,
"kg_co2_emissions": null,
"mteb_version": "1.16.5",
"scores": {
"test": [
{
"ari": 0.6686950213456546,
"cluster_accuracy": 0.8305,
"hf_subset": "default",
"languages": [
"eng-Latn"
],
"main_score": 0.7469370718746896,
"nmi": 0.7469370718746896,
"v_measure": 0.7469370718746896
}
]
},
"task_name": "CIFAR10Clustering"
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name": "nyu-visionx/moco-v3-vit-b", "revision": "7d091cd70772c5c0ecf7f00b5f12ca609a99d69d", "release_date": "2024-06-03", "languages": ["eng_Latn"], "n_parameters": null, "memory_usage": null, "max_tokens": null, "embed_dim": null, "license": null, "open_source": true, "similarity_fn_name": null, "framework": [], "loader": "mocov3_loader"}
{"name": "nyu-visionx/moco-v3-vit-b", "revision": "7d091cd70772c5c0ecf7f00b5f12ca609a99d69d", "release_date": "2024-06-03", "languages": ["eng_Latn"], "n_parameters": null, "memory_usage": null, "max_tokens": null, "embed_dim": null, "license": null, "open_weights": null, "public_training_data": null, "public_training_code": null, "framework": [], "reference": null, "similarity_fn_name": null, "use_instuctions": null, "zero_shot_benchmarks": null, "loader": "mocov3_loader"}

0 comments on commit fab0b82

Please sign in to comment.