You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see from the API reference/examples that I can get the reconstructed image using the calling the od.vae(input_image) function.
Is there a way to get the latent codes/output of the encoder?
The text was updated successfully, but these errors were encountered:
Hey @ahmadSum1,
Assuming you've followed the examples here then you can get the latent codes using the following:
z_mean, z_log_var, z=od.vae.encoder(input_image)
Internally we use the reparameterization trick, so z_mean and z_log_var_z parameterize a normal distribution in the latent space, and z is a latent code sampled from this distribution. I'd use z_mean as the latent code as it'll behave deterministically.
Can I ask what your use case is? We've not particularly written the VAE behaviour to make the above easy for users but if there's a good reason to update the docs or code we'd be interested to hear.
Hello @mauicv ,
Thanks for the prompt response.
I am trying to plot the PCA/TSNE results on the latent space.
I believe it will be an important feature to provide these built-in or at least document the way to access the submodules.
I.e., histogram plotting of the embeddings, to see how different code size affect the performance.
I can see from the API reference/examples that I can get the reconstructed image using the calling the
od.vae(input_image)
function.Is there a way to get the latent codes/output of the encoder?
The text was updated successfully, but these errors were encountered: