Skip to main content
Share Your Experience: Take the 2024 Developer Survey
29 votes
Accepted

What is "posterior collapse" phenomenon?

With the help of better explanations provided in Z-Forcing: Training Stochastic Recurrent Networks: When posterior is not collapsed, $z_d$ (d-th dimension of latent variable $z$) is sampled from $q_{\...
Esmailian's user avatar
  • 9,322
6 votes
Accepted

How does variational autoencoders actually work in comparison to GAN?

VAEs were a hot topic some years ago. They were known to generate somewhat blurry images and sometimes suffered from posterior collapse (the decoder part ignores the bottleneck). These problems ...
noe's user avatar
  • 26.9k
5 votes

Train a GAN on "before and after" images of dental surgeries

It's a very specific problem and there's no right or wrong solution. I'll just write what I'd do in your position and hope that it is useful. How many "before and after" images will I need? You'...
Djib2011's user avatar
  • 7,998
4 votes

ValueError: Cannot convert a partially known TensorShape to a Tensor: (?, 256)

The problem is inside the sampling functions. I had the same problem and found out the answer in the tutorial here. my original code is: ...
Simon Ren's user avatar
3 votes
Accepted

Why maximize ELBO in the variational autoencoder?

For the actual loss function of a VAE, we use $−\mathcal{L}$, more or less. Of course, it's expensive to actually calculate the expectation, which is why we use a single 𝑧 sample each time, yes? ...
user3658307's user avatar
  • 1,020
2 votes
Accepted

What do we visualize in showing a VAE latent space?

When people make 2D scatter plots what do they actually plot? First case: when we want to get an embedding for specific inputs: We either Feed a hand-written character "9" to VAE, receive a 20 ...
Esmailian's user avatar
  • 9,322
2 votes
Accepted

What is the meaning of "probability distribution of p(x)" of something uncountable?

Let me preface this answer by saying I am not an expert on variational autoencoders, but I think your conceptual gaps don't have anything to do with autoencoders. First, it is possible to specify a ...
tom's user avatar
  • 2,248
2 votes
Accepted

Latent variable graph in Variational Autoencoder

As Nikos said in a comment, this is a graph showing the different classes (digits) in the space of the latent variable. First a remark: from the point of view of visualization design I think the ...
Erwan's user avatar
  • 25.5k
2 votes
Accepted

How to make custom callback in keras to generate sample image in VAE training?

I think the two following links could help you 1, 2. The first one is a tutorial, which introduces you how to display images in TensorBoard. If you look at the part on the confusion matrix, you ...
jbondu's user avatar
  • 36
1 vote

Reduce mode searching behaviour of VAE

VAE objective is to maximise the ELBO: $$ \int_x p(x) \int_z q(z|x) \big\{ \log p(x|z) - \log \tfrac{q(z|x)}{p(z)} \big\} $$ the first term reconstructs the data, the second term maximises the ...
Carl's user avatar
  • 396
1 vote
Accepted

Not understanding how to eval a VAE model?

Usually, VAE's are trained as image generators. In that use case, at inference time you only use the decoder part: you just sample a random vector $z$ and give it to the decoder to obtain the image.
noe's user avatar
  • 26.9k
1 vote

How does a VQ-VAE produce new images?

With the help of reddit I figured out the answer. We train the VQ-VAE, and then use it to encode our dataset into the latent space. This latent space, of course, will have a particular distribution (...
Jackilion's user avatar
1 vote

How does variational autoencoders actually work in comparison to GAN?

It depends on the architecture chosen, but generally speaking, they do have some differences that can be measured as follows: How they learn and the training speed Variational Autoencoder learn by ...
FabC's user avatar
  • 31
1 vote
Accepted

What is the dataset during testing a Variational auto-encoder?

When building your VAE model, you must use the common training/testing datasets to train/evaluate your VAE model performances. That means you validate your model using the testing dataset on both the ...
etiennedm's user avatar
  • 1,405
1 vote

Does minimizing kl divergence (i.e. keep approximate posterior close to prior) contradict the goal of avoiding posterior collapse?

You are correct in your reasoning (though I dont' know if I'd call it a "collapse")- the "collapse" to the prior is the ideal intent of a VAE. As a VAE is a type of autoencoder, it'...
Dan's user avatar
  • 104
1 vote

KL divergence loss first decreases and then increases in VAE training

That is the case with VAE training in general. It all boils down to the task you are working on. If you want your model to generate meaningful reconstructions and it does that then I wouldn't worry. ...
Nikos H.'s user avatar
  • 157
1 vote
Accepted

Controlling the sampling from Variational AutoEncoder (VAE)

You condition the latent variable on another variable drawn from a categorical distribution (https://wiseodd.github.io/techblog/2016/12/17/conditional-vae/).
Alec Hoyland's user avatar
1 vote

Help needed in interpreting the loss, val_loss vs epoch plots for an autoencoder training?

You tagged your question with vae, so I will assume that this is a variational autoencoder. In that case, your loss has 2 components: reconstruction error and KL ...
noe's user avatar
  • 26.9k
1 vote

1D CNN Variational Autoencoder Conv1D Size

I think your input dimension to the autoencoder and its output dimensions are different. The input is (1,933,1) while the output is ...
Thoufeer K K's user avatar
1 vote

What are the Most Dissimilar MNIST Digits?

Not sure if this constitutes a "study" but I have investigated using PCA to decompose the MNIST dataset to visualize in 2D: ...
Oliver Foster's user avatar
1 vote

Why KL Divergence instead of Cross-entropy in VAE

Answering with some theoretical understanding of Variational auto-encoders. In the general architecture of encoders and decoders, the encoder encodes the input a latent-space, and the decoder ...
Ashwin Geet D'Sa's user avatar
1 vote
Accepted

What makes the posterior intractable?

It's usually the denominator $p(x)$ (the "evidence") which is intractable. You could attempt to compute it by marginalizing over the latent variable $p(x) = \int p(x|z)p(z)dz$. However, you ...
oW_'s user avatar
  • 6,377
1 vote

VAE generates bad images. due to unbalanced loss functions?

The issue is in your sampling procedure. The purpose of a VAE is to train a neural network, the decoder, that takes samples $z$ from a normal distribution $p(z)$ and maps them to images $x$ such that ...
matthiaw91's user avatar
  • 1,545
1 vote

Can VAEs be used to generate multivariate data?

The CTGAN paper (github) use a VAE to generate multivariate synthetic data from tabular data. See section 4.5.
al0's user avatar
  • 141
1 vote

Intractability in Variational Autoencoders

I believe that you got bogged down by this thought: I understand that it is not possible to analytically compute this integral to optimize for $\theta$. From the paper I understood that: $$ p_\...
grochmal's user avatar
  • 482

Only top scored, non community-wiki answers of a minimum length are eligible