Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latent dim #4

Open
yzhou359 opened this issue Feb 14, 2019 · 2 comments
Open

latent dim #4

yzhou359 opened this issue Feb 14, 2019 · 2 comments

Comments

@yzhou359
Copy link

Hi, what does the latent_dim mean in your code? Could it be changed to other numbers? I can understand that categorical_dim means 10 categories for 10 digits, but I'm confused about the latent_dim. Thanks!

@yjlolo
Copy link

yjlolo commented Dec 29, 2019

Same question here; it would be great if someone can shed lights on latent_dim, which is N in the author's notebook https://github.com/ericjang/gumbel-softmax/blob/master/Categorical%20VAE.ipynb.

Why do we need latent_dim (or number of categorical distributions as in author's notebook), making the fully-connected layer output categorical_dim * latent_dim instead of just categorical_dim?

@gokceneraslan
Copy link

I think latent_dim represents how many categorical variables there is in the model, while categorical_dim denotes the number of categories in each latent categorical variable. This is why the "true" dimensionality of the encoder output and the decoder input is 300 (30 variables x 10 categories for each var) in this model.

The misinterpretation stems from the assumption that 10 categories of the categorical latent space represents 10 digits, but this is not necessarily the case, because there are is a lot of variation in the data in addition to the digit type (azimuth, width, thickness) which is why the model needs more than just 10 categories in the latent space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants