Created
July 13, 2019 08:21
-
-
Save gautham20/8c420f36b98b3e1d31cbef287d67f601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from annoy import AnnoyIndex | |
feature_dim = len(img_repr_df['img_repr'][0]) | |
t = AnnoyIndex(feature_dim, metric='euclidean') | |
for i, vector in enumerate(img_repr_df['img_repr']): | |
t.add_item(i, vector) | |
_ = t.build(inference_data.c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment