Visualizing Latent space #77
-
Is there a way to visualize the latent space to see what features have been learnt? I see there are reconstruction and interpolation functionalities but can't seem to find a way to do so. |
Beta Was this translation helpful? Give feedback.
Answered by
clementchadebec
Feb 15, 2023
Replies: 1 comment 1 reply
-
Hello, embedding = model.embed(your_data_tensor) Before this, you can do the following >>> model.encoder(your_data).embedding E.g. >>> from pythae.models import AutoModel
>>> model = AutoModel.load_from_hf_hub("clementchadebec/reproduced_beta_tc_vae", allow_pickle=True)
Downloading config file ...
Downloading BetaTCVAE files for rebuilding...
Successfully downloaded BetaTCVAE model!
>>> import torch
>>> x = torch.randn(3, 1, 64, 64)
>>> emb = model.encoder(x).embedding
>>> emb.shape
torch.Size([3, 10]) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aissak21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
This feature was recently implemented in #76 (using the
embed
method) and should be available in the next release.Before this, you can do the following
E.g.