1
$\begingroup$

As I understanding the VAE, it's a model to get the P(x) of x(final job like image generation). When i train it, It input x from dataset to get mu and var from encoder, and to get a sample z from mu and var by z = mu + standard_normal * torch.exp(0.5 * log_var). and get x' by z from decoder.

So when i want to use/eval the model I shouldn't have the original x. right? If i already have x, this job is meaningless. then how can i get z if I dont have x (cant get mu and var by encoder)?

I googled and look some code on github. normally people eval this model by put x into it. But I don't get it......

$\endgroup$
0

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer. It's a great help. But still what bothers me a lot is when i see a lot of code such as layout vae when they eval their model they just put ground truth to encoder as they train the model..... is that right movement to do that? $\endgroup$ Jan 16 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.