Inconsistent umap tensorboard result

4158ndfkvBHJ1: <p>I trained a VAE on a dataset of 64*64 grayscale images. My embedding size is 256. If I save my embedded dataset as a tsv file, and upload it on <a href="https://projector.tensorflow.org/" rel="noopener nofollow ugc">https://projector.tensorflow.org/</a>, I get a usable embedding:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/a/4aedeaa910af031e957e3780c71d80c3fba5466e.png" data-download-href="https://discuss.pytorch.org/uploads/default/4aedeaa910af031e957e3780c71d80c3fba5466e" title="tensorboard_good"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/a/4aedeaa910af031e957e3780c71d80c3fba5466e_2_690x341.png" alt="tensorboard_good" data-base62-sha1="aGR492B2KzCUfAMrGFVGaDqWpn8" width="690" height="341" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/a/4aedeaa910af031e957e3780c71d80c3fba5466e_2_690x341.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/a/4aedeaa910af031e957e3780c71d80c3fba5466e_2_1035x511.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/a/4aedeaa910af031e957e3780c71d80c3fba5466e_2_1380x682.png 2x" data-dominant-color="F3EDF1"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">tensorboard_good</span><span class="informations">1920×949 126 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
I would like to add image labels, for visualization purposes. To do this, I need to use the SummaryWriter class. As a test, I’m passing the <em>exact same</em> tsv file to the summary writer:</p>
<pre><code class="lang-auto">vae_unsup_points = np.loadtxt(os.path.join(root_path, "vae_unsup_points.tsv"))
vae_unsup_labels = np.loadtxt(os.path.join(root_path, "vae_unsup_labels.tsv"))
writer_VAE = SummaryWriter("/path/to/logdir/VAE")
writer_VAE.add_embedding(vae_unsup_points, metadata=vae_unsup_labels)
writer_VAE.close()
</code></pre>
<p>It produces completely different (and unusable) results. I think there is too much variation for it to be related to the randomness in UMAP’s initialization:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/5/25da7dcfa815701d94c65349366de01a9f62a032.png" data-download-href="https://discuss.pytorch.org/uploads/default/25da7dcfa815701d94c65349366de01a9f62a032" title="umap_bad"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25da7dcfa815701d94c65349366de01a9f62a032_2_690x340.png" alt="umap_bad" data-base62-sha1="5oRMuH9d9Yg71pjjoCOX91MsSzw" width="690" height="340" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25da7dcfa815701d94c65349366de01a9f62a032_2_690x340.png, https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25da7dcfa815701d94c65349366de01a9f62a032_2_1035x510.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25da7dcfa815701d94c65349366de01a9f62a032_2_1380x680.png 2x" data-dominant-color="F7EDEB"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">umap_bad</span><span class="informations">1920×948 106 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I am very confused by this result, has anybody ever encountered this issue before ?</p>