Added ability to finetune models

This commit is contained in:
2023-04-21 11:22:47 +00:00
parent 151eefa1de
commit 3e9e2196e9
7 changed files with 36 additions and 20 deletions

View File

@@ -238,6 +238,7 @@ def distance_matrix(keypoints, embeddings, p=2, threshold=1000000):
f"{kk}-dimensional vectors")
if m*n*k <= threshold:
print("Using minkowski_distance")
return minkowski_distance(x[:,np.newaxis,:],y[np.newaxis,:,:],p)
else:
result = np.empty((m,n),dtype=float) # FIXME: figure out the best dtype