Skip to content

Conversation

@edyoshikun
Copy link
Member

@edyoshikun edyoshikun commented Jan 3, 2025

This PR adds the ability to save the embeddings and see them as a projection in tensorboard.

  • Prototype to add things to the tensorboard projection
  • Write a method to see how the embeddings evolves per epoch (Embeddings per epoch are saved in different .tsv)
  • Add additionally labels to color and filter the embeddings for interoperability (See anchor/positive pair coloring)

Screenshot 2025-01-02 at 5 37 49 PM
Screenshot 2025-01-06 at 9 35 00 AM

@ziw-liu ziw-liu linked an issue Jan 3, 2025 that may be closed by this pull request
@ziw-liu ziw-liu added enhancement New feature or request representation Representation learning (SSL) labels Jan 3, 2025
@edyoshikun edyoshikun marked this pull request as ready for review January 6, 2025 17:38
self._log_step_samples(batch_idx, (anchor, pos_img), "val")

# Store embeddings for visualization
if self.current_epoch % self.embedding_log_interval == 0 and batch_idx == 0:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziw-liu I was only logging the first batch and only from the validation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that always be the first time point(s) then?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will not be a representative (i.e. uniformly sampled) subset of the validation set. For example, in an infection time-lapse, all logged examples will be uninfected.

@edyoshikun edyoshikun changed the title adding prototype for tensoboard projector to visualize the embeddings with UMAP,TSNE, PCA/ Tensorboard projector for contrastive learning for embedding visualization Jan 7, 2025
@edyoshikun
Copy link
Member Author

Use the #301 instead. This one has fell back and one has to solve a lot of merge conflicts.

@edyoshikun edyoshikun closed this Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request representation Representation learning (SSL)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log embeddings in TensorBoard

3 participants