Last active
June 20, 2019 13:46
-
-
Save gaphex/16fac5f6c2e7aed58a4be6d0dd813d93 to your computer and use it in GitHub Desktop.
top_k distances and indices retrieval
This file contains hidden or 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
top_k = 3 | |
top_neg_dists, top_indices = tf.math.top_k(tf.negative(distance), k=top_k) | |
top_dists = tf.negative(top_neg_dists) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment