In factor vae, Disentangling by Factorising, there are two losses that are minimized. One is the VAE loss (eq. 2 in the paper) that includes (1) reconstruction loss, (2) KL divergence and (3) Total correlation loss, which is obtained by using a discriminator network which itself is trained via the minimization of the Discriminator loss. Should the discriminator network weights be frozen while performing backpropagation to minimize the VAE loss?

  • $\begingroup$ I had misread your question, I thought you wanted to know if the discriminator was pretrained $\endgroup$
    – Firebug
    Jul 1, 2023 at 8:26

1 Answer 1


Yes, when training the VAE, you should freeze the weights of the discriminator and only update the VAE parameters ($\theta$).

Algorithm 2 provides a nice summary of how to jointly train the two models (take notice that the parameters ($\theta, \psi$) are updated separately).

  • 1
    $\begingroup$ Yes, thanks! I noticed that in algorithm 2 as well and had included in a comment, but somehow the comment got deleted by someone. Thought I'd confirm my understanding here after seeing a couple of github implementations where the freezing was not done. $\endgroup$
    – S R
    Jul 6, 2023 at 19:23

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.