Skip to content

Commit 0c46dd8

Browse files
author
Pingchuan Ma
committedDec 9, 2021
Clean up metriclearning/evaluation/
1 parent ce4fe2c commit 0c46dd8

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed
 

‎browse_results.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import shelve
22
from collections import defaultdict
3-
import sys
43
import os
54
import re
65
import time
@@ -9,7 +8,6 @@
98
import time
109
import glob
1110
import argparse
12-
import copy
1311

1412

1513
def is_match(x):

‎metriclearning/evaluation/normalized_mutual_information.py

-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
TORCH_SKLEARN_BACKEND = 'torch+sklearn'
66
FAISS_BACKEND = 'faiss'
77
FAISS_GPU_BACKEND = 'faiss-gpu'
8-
_backends_ = [TORCH_SKLEARN_BACKEND, FAISS_BACKEND, FAISS_GPU_BACKEND]
98

10-
_DEFAULT_BACKEND_ = FAISS_BACKEND
119
_DEFAULT_BACKEND_ = FAISS_GPU_BACKEND
12-
#_DEFAULT_BACKEND_ = TORCH_SKLEARN_BACKEND
1310

1411

1512
def cluster_by_kmeans(X, nb_clusters, gpu_id=None, backend=_DEFAULT_BACKEND_):

‎metriclearning/evaluation/recall.py

-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
TORCH_SKLEARN_BACKEND = 'torch+sklearn'
1010
FAISS_BACKEND = 'faiss'
1111
FAISS_GPU_BACKEND = 'faiss-gpu'
12-
_backends_ = [TORCH_SKLEARN_BACKEND, FAISS_BACKEND, FAISS_GPU_BACKEND]
1312

14-
_DEFAULT_BACKEND_ = FAISS_BACKEND
1513
_DEFAULT_BACKEND_ = FAISS_GPU_BACKEND
16-
#_DEFAULT_BACKEND_ = TORCH_SKLEARN_BACKEND
1714

1815

1916
def assign_by_euclidian_at_k(X, T, k, gpu_id=None, backend=_DEFAULT_BACKEND_):

0 commit comments

Comments
 (0)
Please sign in to comment.