tensorboard icon indicating copy to clipboard operation
tensorboard copied to clipboard

Embedding Projector: fix knn for non-normalized vectors

Open alicialics opened this issue 1 year ago • 0 comments

Motivation for features / changes

Fixes #6271 Fixes #5547

Technical description of changes

the reason is that knn expects normalized vectors for cosine distance (cosDistNorm) rather than arbitrary vectors.

Screenshots of UI changes

N/A

Detailed steps to verify changes work correctly (as executed by you)

  • Build and launch projector (must be from master, not https://projector.tensorflow.org)
  • Select Iris demo tensor dataset
  • Keep "Sphereize data" unchecked
  • change projection type to T-SNE
  • The end result is different from what happens when using https://projector.tensorflow.org/
  • change projection tyoe to UMAP
  • See "Initialize UMAP..." modal loading forever

Alternative repo:

  • Build and launch projector (must be from master, not https://projector.tensorflow.org)
  • Uncheck "Sphereize data" on the default Word2Vec 10k dataset
  • Switch projection from "PCA" to either t-SNE or UMAP
  • See the UI breaks with "Initializing t-SNE..."/"Initialize UMAP..." modal loading forever

Alternate designs / implementations considered

alicialics avatar Apr 05 '23 20:04 alicialics